Jump to content
Sign in to follow this  
seres

i dont have more space in the gui

Recommended Posts

seres

hello, i started a program and i created a gui for it, i have to be adding more stuff to the gui, when i run out of space (gui), i had to start another program and create another gui,

do you know if theres a way to create tabs or something that when i click it shows me the first or second part of the program, so i can make this 2 programs one

if theres an example can you please show it, or a link to that example

thanks

Share this post


Link to post
Share on other sites
sleepydvdr

Use Koda to help you create tabs.

I created this in 30 seconds with Koda.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 331, 227, 192, 124)
$Tab1 = GUICtrlCreateTab(16, 16, 289, 193)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Button1 = GUICtrlCreateButton("Button1", 32, 96, 75, 25)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$Button2 = GUICtrlCreateButton("Button2", 192, 176, 75, 25)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$Button3 = GUICtrlCreateButton("Button3", 192, 48, 75, 25)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
sleepydvdr

Another thing you can do is to create popup guis for things that don't always need to be seen, such as a settings panel.

Example:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>

$Form1 = GUICreate("Test", 331, 227, -1, -1)
$Input1 = GUICtrlCreateInput("Input1", 24, 24, 121, 21)
$Button1 = GUICtrlCreateButton("Submit", 240, 176, 75, 25)
$Button2 = GUICtrlCreateButton("Settings", 232, 24, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 24, 72, 185, 89)
GUICtrlSetData(-1, "Edit1")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button2
            _SettingsPanel()
    EndSwitch
WEnd

Func _SettingsPanel()


#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Settings", 331, 227, -1, -1)
$Input1a = GUICtrlCreateInput("Input1", 48, 24, 121, 21)
$Input2 = GUICtrlCreateInput("Input2", 48, 56, 121, 21)
$Input3 = GUICtrlCreateInput("Input3", 48, 88, 121, 21)
$Input4 = GUICtrlCreateInput("Input4", 48, 120, 121, 21)
$Combo1 = GUICtrlCreateCombo("Combo1", 48, 160, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Radio1 = GUICtrlCreateRadio("This", 216, 32, 113, 17)
$Radio2 = GUICtrlCreateRadio("That", 216, 64, 113, 17)
$Button3 = GUICtrlCreateButton("Save", 232, 160, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUIDelete($Form2)
            ExitLoop
        Case $Button3
            GUIDelete($Form2)
            ExitLoop
    EndSwitch
WEnd

EndFunc

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
seres

Use Koda to help you create tabs.

I created this in 30 seconds with Koda.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 331, 227, 192, 124)
$Tab1 = GUICtrlCreateTab(16, 16, 289, 193)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Button1 = GUICtrlCreateButton("Button1", 32, 96, 75, 25)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$Button2 = GUICtrlCreateButton("Button2", 192, 176, 75, 25)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$Button3 = GUICtrlCreateButton("Button3", 192, 48, 75, 25)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

hello, thanks this one really helped me

Edited by Jon

Share this post


Link to post
Share on other sites
Melba23

seres,

Take a look at the GUIExtender UDF in my sig. It allows you to extend parts of your GUI when needed and retract them when not. :mellow:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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  

×