03-31-2022 09:16 AM
Looking for a pointer or to finish me off please.
I've got a UI with buttons (boolean) on it.
I've also got a tab control on it and some more buttons on pages of the tab control.
I want to use VI scripting to perform some tasks (in this case static code tests) on the buttons.
I can split out the split out the controls using traverse FP for GObjects into those of ClassName=Boolean and then sub divide them into those whose Owner is ClassName=Panel or Page...
However from here I can't seem to get a reference to allow me to determine the tab control page name on which the controls actually sit
Ideas please? - I'm missing something fundamentally obvious I think.
Thanks
James
Solved! Go to Solution.
03-31-2022 09:47 AM
@James_W wrote:
Looking for a pointer or to finish me off please.
I've got a UI with buttons (boolean) on it.
I've also got a tab control on it ......
Ideas please? - I'm missing something fundamentally obvious I think.
Thanks
James
James my friend, the obvious thing you're doing wrong it using those Tab Containers. I HATE THEM!
I suspect that the owning class is pane or container
Class hierarchy should be vi fp panel, pane (if there is a splitter) container of type tab. Pages/panes of tab names.
03-31-2022 09:58 AM
Seems like you would have to get the reference to your tab control in question, and make a list of which controls are on which page as so, and then look each control up
I'm not sure of your specifics or what you're trying to do, but if you don't really care about the Booleans not on the tab control, then I feel like you'd be better off traversing to find that tab control ref, then from it you can neatly get an array of references for the controls of each page.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
03-31-2022 10:14 AM
You can use the To More Specific Class function to cast the Owner reference to the Page class, then read properties of the page:
03-31-2022 10:26 AM
@JÞB wrote:
@James_W wrote:
Looking for a pointer or to finish me off please.
I've got a UI with buttons (boolean) on it.
I've also got a tab control on it ......
Ideas please? - I'm missing something fundamentally obvious I think.
Thanks
JamesJames my friend, the obvious thing you're doing wrong it using those Tab Containers. I HATE THEM!
I suspect that the owning class is pane or container
Class hierarchy should be vi fp panel, pane (if there is a splitter) container of type tab. Pages/panes of tab names.
The fact that you hate tab controls doesn't make it wrong to use them.
03-31-2022 10:27 AM
@James_W wrote:
Looking for a pointer or to finish me off please.
In general, 'finishing someone off' means to kill that person.
03-31-2022 11:56 AM
@paul_cardinale wrote:
@James_W wrote:
Looking for a pointer or to finish me off please.
In general, 'finishing someone off' means to kill that person.
Or, "la petite mortae" but I'm not going to help with either of those.
04-01-2022 02:43 AM
Thanks Darren,
@Darren wrote:
You can use the To More Specific Class function to cast the Owner reference to the Page class, then read properties of the page:
That's exactly what I was looking for.
for some reason I didn't try the obvious - I thought I should have been there easily.
I tried to more specific Tab class and an Open VI Object reference on the Page, but that didn't give me the correct PageLabel.
James
04-01-2022 02:53 AM
@paul_cardinale wrote:
@James_W wrote:
Looking for a pointer or to finish me off please.
In general, 'finishing someone off' means to kill that person.
If you're going to be picky, Paul, that's only the general case! And English is my mother tongue (not American) 😉, so I'm going to allow myself that leeway when tired and when the meaning is very clear. This is not a forum of hitmen or dog salesmen either, so lets leave it at that.
(I keep looking for a dog - maybe you've just guided me to the correct breed for a programmer😂)
Jay, that sort of language has no place on this forum surely you should know! 😂
James
04-01-2022 06:55 AM
Did you really post a reference to a pointer?
And you say I abuse the LabVIEW Forum!
😆🤣😂