A acorrias Member Licensed User Longtime User Apr 22, 2016 #1 Hi I wish to know how to refer to object properties when they are accessed trought its parent. That is, I realized that I cannot access properties of views directly, but I have to declare an object with the same type of the view in order to get some custon property. that is, suppose that the panel p contains a label so this doesn't work Code: Copy msgbox(p.getview(1).text,"") this works Code: Copy dim la as label la=p.GetView(1) msgbox(la.text,"") is there a reason? is an alternative way to access properties. Is it correct? thanks Alex
Hi I wish to know how to refer to object properties when they are accessed trought its parent. That is, I realized that I cannot access properties of views directly, but I have to declare an object with the same type of the view in order to get some custon property. that is, suppose that the panel p contains a label so this doesn't work Code: Copy msgbox(p.getview(1).text,"") this works Code: Copy dim la as label la=p.GetView(1) msgbox(la.text,"") is there a reason? is an alternative way to access properties. Is it correct? thanks Alex
somed3v3loper Well-Known Member Licensed User Longtime User Apr 22, 2016 #2 I think the reason is that p.GetView(index) returns a general View and not TextView type so there is no .Text property . Upvote 0
I think the reason is that p.GetView(index) returns a general View and not TextView type so there is no .Text property .
DonManfred Expert Licensed User Longtime User Apr 23, 2016 #3 somed3v3loper said: I think the reason is that p.GetView(index) returns a general View and not TextView type so there is no .Text property . Click to expand... Correct. It is a reference to the correct Object but it is a VIEW. So you need to cast the view first to a Button, Label, whatever; to get the correct Properties Upvote 0
somed3v3loper said: I think the reason is that p.GetView(index) returns a general View and not TextView type so there is no .Text property . Click to expand... Correct. It is a reference to the correct Object but it is a VIEW. So you need to cast the view first to a Button, Label, whatever; to get the correct Properties