Jump to content
Sign in to follow this  
Drew

Listbox and Tabs

Recommended Posts

Drew

Is it possible to put a listbox ON a tab?

I have tabcontrol with 3 sections , and each needs to display a different set of items. I've been using Koda , and can't seem to put a listbox on a tab without it putting it on them all... which isn't a problem if I can still determine what information is displayed on each.

Can someone point me in the right direction?

Thanks,

Drew

Share this post


Link to post
Share on other sites
Nahuel

Of course you can. You have to use GUISwitch() to swich between tabs and create the listviews.

I haven't tested it but I'm really sure this is possible.

Share this post


Link to post
Share on other sites
Drew

Is there a way to do it through Koda? I've been rather dependent on that in making my GUI's. ( Thats probably a bad thing I'm sure. )

Thank you for your reply Nahuel ;).

Share this post


Link to post
Share on other sites
Nahuel

Well... i made this with Koda:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 478, 367, 193, 138)
$Tab1 = GUICtrlCreateTab(36, 4, 409, 339)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$ListView1 = GUICtrlCreateListView("", 68, 44, 317, 287)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
GUICtrlSetState(-1,$GUI_SHOW)
$ListView2 = GUICtrlCreateListView("", 154, 56, 173, 257)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Is that what you wanted to do? Just click on Tab Control on Koda (it's on the Win32 tab). Paste it on your Gui, then right-click on it go to "new page". Do this again to create another one. Then switch between the pages and create the listviews. It does it with no problem.

Edited by Nahuel

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.