Sign in to follow this  
Followers 0
Andrew Peacock

ListBox Doesn't Work With Tabs

8 posts in this topic

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

Share this post


Link to post
Share on other sites



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.

 

Share this post


Link to post
Share on other sites

Use the built-in create for use with the tabs

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,

Andy

Share this post


Link to post
Share on other sites

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,

Andy

What 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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

What 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.

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0