Jump to content

Tab problems


Go to solution Solved by water,

Recommended Posts

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?

 

Link to comment
Share on other sites

  • Solution

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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