Andrew Peacock Posted December 20, 2007 Share Posted December 20, 2007 Hi, I'm trying to use a listbox on a tabbed interface, but the listbox shows on all tabs, in the same position. Here's the cut-down version of the code I'm using: #include <GUIConstants.au3> #Include <GuiListBox.au3> #Include <GuiTab.au3> $gui = guicreate("UBC Writers Tool", @DesktopWidth,@DesktopHeight - 50, 0, 0) $tab = GUICtrlCreateTab(10, 10, @DesktopWidth-20, @DesktopHeight-70) $tab0 = GUICtrlCreateTabitem("Spinning") $select = _GUICtrlListBox_Create($gui, "", 30, 70, 350, 200, Bitor($LBS_MULTIPLESEL, $WS_VSCROLL, $LBS_SORT )) $tab1 = GUICtrlCreateTabitem("Projects") $tab2 = GUICtrlCreateTabitem("Config") GUICtrlCreateTabitem ("") ; end tabitem definition GUISetState(@SW_SHOW) GUISetState(@SW_ENABLE) while 1=1 sleep(50) WEnd Can anyone shed any light? I'm using v3.2.10.0 Regards, Andy Link to comment Share on other sites More sharing options...
GaryFrost Posted December 20, 2007 Share Posted December 20, 2007 Hi, I'm trying to use a listbox on a tabbed interface, but the listbox shows on all tabs, in the same position. Here's the cut-down version of the code I'm using: #include <GUIConstants.au3> #Include <GuiListBox.au3> #Include <GuiTab.au3> $gui = guicreate("UBC Writers Tool", @DesktopWidth,@DesktopHeight - 50, 0, 0) $tab = GUICtrlCreateTab(10, 10, @DesktopWidth-20, @DesktopHeight-70) $tab0 = GUICtrlCreateTabitem("Spinning") $select = _GUICtrlListBox_Create($gui, "", 30, 70, 350, 200, Bitor($LBS_MULTIPLESEL, $WS_VSCROLL, $LBS_SORT )) $tab1 = GUICtrlCreateTabitem("Projects") $tab2 = GUICtrlCreateTabitem("Config") GUICtrlCreateTabitem ("") ; end tabitem definition GUISetState(@SW_SHOW) GUISetState(@SW_ENABLE) while 1=1 sleep(50) WEnd Can anyone shed any light? I'm using v3.2.10.0 Regards, Andy Use the built-in create for use with the tabs SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Andrew Peacock Posted December 20, 2007 Author Share Posted December 20, 2007 Use the built-in create for use with the tabsThanks Gary.Is there no way to get the _GUICtrlListBox_Create to work with tabs? I've already written a chunk of code around the _GUICtrlListBox_Create version, and I'd hate to have to write it just for the added functionality I'm putting in the tabs. Regards,Andy Link to comment Share on other sites More sharing options...
GaryFrost Posted December 20, 2007 Share Posted December 20, 2007 Thanks Gary.Is there no way to get the _GUICtrlListBox_Create to work with tabs? I've already written a chunk of code around the _GUICtrlListBox_Create version, and I'd hate to have to write it just for the added functionality I'm putting in the tabs. Regards,AndyWhat functionality can you not do with the built-in that you can with UDF create? all the functions should work with both. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Andrew Peacock Posted December 20, 2007 Author Share Posted December 20, 2007 What functionality can you not do with the built-in that you can with UDF create? all the functions should work with both.Gary, it's not that I can't do it, it's that I don't want to rewrite. But I guess I'll have to.But that begs the question - why is AutoIt getting shipped with the built in listview and the UDF listbox, if they do the same thing?Regards,Andy Link to comment Share on other sites More sharing options...
GaryFrost Posted December 20, 2007 Share Posted December 20, 2007 Gary, it's not that I can't do it, it's that I don't want to rewrite. But I guess I'll have to.But that begs the question - why is AutoIt getting shipped with the built in listview and the UDF listbox, if they do the same thing?Regards,AndyNo real reason, I ported a bunch of code from a library, and the creates came with it, in some cases the UDF created control has more functionality, but in this case it should be the same.Shouldn't be much of re-write, just the create far as I know on this one. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Andrew Peacock Posted December 20, 2007 Author Share Posted December 20, 2007 No real reason, I ported a bunch of code from a library, and the creates came with it, in some cases the UDF created control has more functionality, but in this case it should be the same.Shouldn't be much of re-write, just the create far as I know on this one.OK, I tried just changing the create, but leaving everything else the same, and the other functionality doesn't work.Another solution could be to move the tabs. My app window is basically split in two - I'll leave the listbox in the top half, and put the tabs in the bottom half only, rather than the tabs using the whole window.Thanks for your help,Andy Link to comment Share on other sites More sharing options...
GaryFrost Posted December 20, 2007 Share Posted December 20, 2007 OK, I tried just changing the create, but leaving everything else the same, and the other functionality doesn't work.Another solution could be to move the tabs. My app window is basically split in two - I'll leave the listbox in the top half, and put the tabs in the bottom half only, rather than the tabs using the whole window.Thanks for your help,AndyWhat other functionality doesn't work? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now