how can I select a folder?
francesca casiraghi
Hallo,which is the right C# instruction to select a folder in a form?
I tried with
Folder.GetFromUID(pVal.Form, "138").Select;
but I get an error: CS0201 saying something like "only the object's assignment,s calls, increases and decreases can be used as instructions"
(sorry from the wild translation from italian).
I need to select the folder before setting the value of one of its combobox otherwise I get the error that the combo is not editable.
Thanks a lot for your help,
francesca
Fritz Schwendemann
Ciao FrancescaTo select a combobox within a form and assign a new value, you simply type
ComboBox.GetFromUID(pVal.Form, "").Value = ;
People can help you better when you tell form number and itemnumber.
Did you download coresuite customize examples already? Look here
http://www.coresuite.ch/index.php?id=461&L=
Good luck!
Fritz
Marco Schweighauser
Hello Francesca,I think the brackets are missing:
Folder.GetFromUID(pVal.Form, "138").Select();
If you just need to set the combobox value without actually switching:
pVal.Form.Freeze(true); // Freeze the form
int oldLevel = pVal.Form.PaneLevel;
pVal.Form.PaneLevel = x // Panelevel you need to switch
ComboBox.GetFromUID(pVal.Form, "").Value = "";
pVal.Form.PaneLevel = oldLevel;
pVal.Form.Freeze(false); // De-Freeze the form
With Freeze you can deactivate the form refreshment. The user won't see how you switch the folder and the combobox update is much faster. Please do not forget to De-Freeze, otherwise the user can't use the form anymore.
Regards,
Marco
francesca casiraghi
Hi Marco,thanks for your preciuìous help!
You're right! the problem was the missing brackets! :-?
And of course, I don't really need to switch folder, it was the only workaround I could think of! Your solution is much better!
Thank you very much for your support!
francesca
0
Please sign in to leave a comment.
Comments
0 comments