1. Win32Lib
- Posted by Mike777 Aug 03, 2008
- 937 views
I'm sure I've asked this before, but without the search functions working (either the one on the forum, or the one in my brain), I'm forced to admit my incompetence and ask again.
I have a program that builds hundreds and hundreds of controls using newUIObj. These controls are inserted onto a series of tab controls/tab indexes (pages), Maybe 7 or 8 primary tab indexes, each of which have 2 or 3 (sometimes more) tab indexes of their own (within a single tab control on each, of course).
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
The only solution I have right now, is to manually click each and every tab index page (including the sub-tab indexes on each page) and then, after all have been selected once, I can return to any give page and only the controls from that page will be visible.
Am I doing something fundamentally wrong by just calling newUIObj with lots of controls?
I suppose I can keep track of all of the tab indexes that are being built and then insert a setfocus command that courses through them "tricking" the computer into thinking that they have each been individually selected.
If there is a "right" way to do this, though, that I'm just ignoring, I'd rather do it the "right" way.
Thanks
Mike
2. Re: Win32Lib
- Posted by ghaberek (admin) Aug 03, 2008
- 915 views
- Last edited Aug 04, 2008
I'm sure I've asked this before, but without the search functions working (either the one on the forum, or the one in my brain), I'm forced to admit my incompetence and ask again.
I have a program that builds hundreds and hundreds of controls using newUIObj. These controls are inserted onto a series of tab controls/tab indexes (pages), Maybe 7 or 8 primary tab indexes, each of which have 2 or 3 (sometimes more) tab indexes of their own (within a single tab control on each, of course).
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
The only solution I have right now, is to manually click each and every tab index page (including the sub-tab indexes on each page) and then, after all have been selected once, I can return to any give page and only the controls from that page will be visible.
Am I doing something fundamentally wrong by just calling newUIObj with lots of controls?
I suppose I can keep track of all of the tab indexes that are being built and then insert a setfocus command that courses through them "tricking" the computer into thinking that they have each been individually selected.
If there is a "right" way to do this, though, that I'm just ignoring, I'd rather do it the "right" way.
Are you manually setting the parent to the tab item (not the entire tab control) when you create them?
-Greg
3. Re: Win32Lib
- Posted by Mike777 Aug 04, 2008
- 891 views
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
Are you manually setting the parent to the tab item (not the entire tab control) when you create them?
-Greg
All tab items must have a parent of a tab control, IIRC. I am therefore using parent=tbcParentTabControl in the newUIObj command which creates the tabitem. Of course, the tbcParentTabControl has already been created at that point.
Does that count as "manually"?
Mike
4. Re: Win32Lib
- Posted by CChris Aug 04, 2008
- 913 views
I'm sure I've asked this before, but without the search functions working (either the one on the forum, or the one in my brain), I'm forced to admit my incompetence and ask again.
I have a program that builds hundreds and hundreds of controls using newUIObj. These controls are inserted onto a series of tab controls/tab indexes (pages), Maybe 7 or 8 primary tab indexes, each of which have 2 or 3 (sometimes more) tab indexes of their own (within a single tab control on each, of course).
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
The only solution I have right now, is to manually click each and every tab index page (including the sub-tab indexes on each page) and then, after all have been selected once, I can return to any give page and only the controls from that page will be visible.
Am I doing something fundamentally wrong by just calling newUIObj with lots of controls?
I suppose I can keep track of all of the tab indexes that are being built and then insert a setfocus command that courses through them "tricking" the computer into thinking that they have each been individually selected.
If there is a "right" way to do this, though, that I'm just ignoring, I'd rather do it the "right" way.
Thanks
Mike
This was corrected in win32lib 0.70.1. Which version are you using?
Also, be sure to parent your controls to the right tab item, not the tab control.
CChris
5. Re: Win32Lib
- Posted by ghaberek (admin) Aug 04, 2008
- 869 views
All tab items must have a parent of a tab control, IIRC. I am therefore using parent=tbcParentTabControl in the newUIObj command which creates the tabitem. Of course, the tbcParentTabControl has already been created at that point.
Does that count as "manually"?
I meant the controls on the tabs. Are you parenting those manually? Like this:
TabControl, "Tabs" TabItem, "Tab1", Parent="Tabs" PushButton, "Button1", Parent="Tab1" TabItem, "Tab2", Parent="Tabs" PushButton, "Button2", Parent="Tab2"
(It's been a while since I've used this style in Win32Lib, but I'm pretty sure the above is correct.)
-Greg
6. Re: Win32Lib
- Posted by Mike777 Aug 04, 2008
- 890 views
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
This was corrected in win32lib 0.70.1. Which version are you using?
Also, be sure to parent your controls to the right tab item, not the tab control.
CChris
0.70.4 15/March/2008 is the version.
All controls have their parent set in the newUIObj command. Tab indexes have parents of tab controls (they are the only controls to have tab controls as their parent). All controls on a specific tab index have the tab index as their parent.
Mike
7. Re: Win32Lib
- Posted by Mike777 Aug 04, 2008
- 882 views
All tab items must have a parent of a tab control, IIRC. I am therefore using parent=tbcParentTabControl in the newUIObj command which creates the tabitem. Of course, the tbcParentTabControl has already been created at that point.
Does that count as "manually"?
I meant the controls on the tabs. Are you parenting those manually? Like this:
TabControl, "Tabs" TabItem, "Tab1", Parent="Tabs" PushButton, "Button1", Parent="Tab1" TabItem, "Tab2", Parent="Tabs" PushButton, "Button2", Parent="Tab2"
(It's been a while since I've used this style in Win32Lib, but I'm pretty sure the above is correct.)
-Greg
See my response to CChris. All controls on the tabs are created with a parent=tabindex explicitly stated on the newUIObj command.
Mike
8. Re: Win32Lib
- Posted by Mike777 Aug 05, 2008
- 896 views
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
This was corrected in win32lib 0.70.1. Which version are you using?
Also, be sure to parent your controls to the right tab item, not the tab control.
CChris
0.70.4 15/March/2008 is the version.
All controls have their parent set in the newUIObj command. Tab indexes have parents of tab controls (they are the only controls to have tab controls as their parent). All controls on a specific tab index have the tab index as their parent.
Mike
Is there a workaround, like 1) getting all the children of the master tab control; 2) executing a set focus on a sequence which consists of the names of all the children?
Mike
9. Re: Win32Lib
- Posted by Mike777 Aug 08, 2008
- 882 views
After all of the controls are placed on the window, no matter which tab index I "set focus" to, I still see many of the controls. It looks like they are all overlaying the screen with different z-orders, but they are all remaining visible! Quite the mess.
This was corrected in win32lib 0.70.1. Which version are you using?
Also, be sure to parent your controls to the right tab item, not the tab control.
CChris
0.70.4 15/March/2008 is the version.
All controls have their parent set in the newUIObj command. Tab indexes have parents of tab controls (they are the only controls to have tab controls as their parent). All controls on a specific tab index have the tab index as their parent.
Mike
Is there a workaround, like 1) getting all the children of the master tab control; 2) executing a set focus on a sequence which consists of the names of all the children?
Mike
CChris, any thoughts on this?