Iterating Controls on Tabstrip
Posted
#1
(In Topic #1166)
Regular

Iconpanel on a Form, Panel on the Iconpanel, then a Tabstrip on the Panel and then Textfields on the Tabstrip. I Iterate over all controls do change the text in the Textbox.
Only visible Tabs will change the Text, all other dont change the Text…
To solve this, i have to insert the textfields in a panel and iterate every control in the panel, inside the Tabs.
(Sorry for my english..)
Thanks
Posted
Guru

<IMG src="https://www.cogier.com/gambas/ActionProperty.png">
</IMG>Then delete all your code and replace with:-
Let us know if I have not understood you correctly.
Posted
Regular

Code (gambas)
Posted
Guru

I do not know of this TextBox(ctrl).Text syntax you are using?
like this…
Code (gambas)
- 'Edit
- Case "TextBox"
- res[ctrl.Tag] = ctrl.text
- Case "ComboBox"
- res[ctrl.Tag] = ctrl.text
- Case "ComboSeek"
- res[ctrl.Tag] = ctrl.text
- Case "CheckBox"
- res[ctrl.Tag] = ctrl.value
- Case "DateBox"
- res[ctrl.tag] = ctrl.value
- Case "ValueBox"
- res[ctrl.Tag] = ctrl.value
- Case "TextArea"
- res[ctrl.Tag] = ctrl.text
- ' Case "TabStrip"
- ' SaveDataSubdetail(ctrl, ByRef Res)
See i use ctrl as Object , this means things like ctrl.Text become usable as Object can be anything and ANY property name can be used and accessed if it exists , but Control.class is limited to only use native Control.class properties that does not have .Text, .Value, etc.
Posted
Regular

1 guest and 0 members have just viewed this.


