Jump to content

ListBox Doesn't Work With Tabs


Recommended Posts

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

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

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

Link to comment
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.

 

Link to comment
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

Link to comment
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.

 

Link to comment
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

Link to comment
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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...