[Gambas-user] Getting the 'name' property
vinians
vinians at ...927...
Mon Oct 10 14:17:15 CEST 2005
Hi all, anyone can help-me how to get the 'name' of an object?
see this code:
FUNCTION GetNamofControls(hObject AS Object) AS String[]
DIM hControl AS Control
DIM iNumTabs AS Integer
DIM i AS Integer
DIM sNames AS String
sNames = ""
FOR EACH hControl IN hObject.Children
IF Object.Class(hControl) = "TextBox" OR Object.Class(hControl) = "ComboBox" OR Object.Class(hControl) =
"TextArea" THEN
sNames = sNames & Object.GetProperty(hControl, "name") & " " <--------- if was 'text' or other this
code work!
ENDIF
IF Object.Class(hControl) = "TabStrip" THEN
iNumTabs = Object.GetProperty(hControl, "Count")
FOR i = 0 TO iNumTabs - 1
Object.SetProperty(hControl, "Index", i)
sNames = sNames & GetaNomeControles(hControl).Join(" ") & " "
NEXT
Object.SetProperty(hControl, "Index", 0)
ENDIF
NEXT
RETURN Split(sNames, " ")
END
This code should function, but I get the 'Property Name does not exists' please I need help pleae!
More information about the User
mailing list