Jump to content
Sign in to follow this  
EpicKnarvik97

Tab problems

Recommended Posts

EpicKnarvik97

I made an example script:

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiComboBoxEx.au3>
$Gui = GUICreate("Program", 945, 150, 0, 0)
$Tab1 = GUICtrlCreateTab(8, 8, 930, 110)
For $i = 0 To 0
Global $TabSheet1 = GUICtrlCreateTabItem("Basic Functions"), $Button1 = GUICtrlCreateButton("Do something", 24, 85, 75, 25), $Button2 = GUICtrlCreateButton("Do something else", 840, 85, 75, 25), $Button3 = GUICtrlCreateButton("Do another ting", 112, 85, 75, 25), $Command_Arguments = GUICtrlCreateInput("", 392, 85, 320, 21), $Button4 = GUICtrlCreateButton("Another function", 208, 85, 75, 25), $Button5 = GUICtrlCreateButton("Do function", 304, 85, 75, 25), $helpmenu = GUICtrlCreateMenu("Help"), $aboutitem = GUICtrlCreateMenuItem("About", $helpmenu)
Next
Global $TabSheet2 = GUICtrlCreateTabItem("Config"), $Label1 = GUICtrlCreateLabel("Choose", 24, 37, 166, 20), $Combo1 = GUICtrlCreateCombo("1", 24, 54, 161, 25, $CBS_DROPDOWNLIST), $Checkbox1 = GUICtrlCreateCheckbox("Option", 24, 77, 97, 17)
GUICtrlSetFont($Label1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetData($Combo1, "1|2|3|4|5|6|7|8|9|10")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd

As you can see, when you start the program, you can't see any buttons. If you click on tab two, the config items appear. If you go back, all the buttons reappear. How should I make the buttons appear on startup?

 

Share this post


Link to post
Share on other sites
water

Insert

GUICtrlCreateTabItem("")

before

GUISetState(@SW_SHOW)

The help file states:

"To terminate the tab control just create a last "tabitem" control with a null text".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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  

×