Jump to content

Recommended Posts

Posted

Hey,

I have some trouble to get this working.

What i'm trying to do is something like this :

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 375, 180, -1, -1)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Button1 = GUICtrlCreateButton("OK", 16, 48, 75, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input1 = GUICtrlCreateInput("", 16, 16, 121, 21)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 248, 16, 81, 17)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 248, 48, 81, 17)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 248, 80, 81, 17)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Radio1 = GUICtrlCreateRadio("Radio1", 16, 128, 65, 17)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Radio2 = GUICtrlCreateRadio("Radio2", 88, 128, 65, 17)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Radio3 = GUICtrlCreateRadio("Radio3", 176, 128, 65, 17)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Size = WinGetPos($Form1)
WinMove ( $Form1, "", $Size[0], $Size[1], 190, 125, 1)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            For $i = 190 To 350
                WinMove ( $Form1, "", $Size[0], $Size[1], $i, 125, 1 )
            Next
            For $i = 125 To 200
                WinMove ( $Form1, "", $Size[0], $Size[1], 350, $i, 1 )
            Next
    EndSwitch
WEnd

The things is, i want to have at beggining the complete full GUI, and when i press start, it resize it per the left (mean left get resize), to finaly only have the checkbox.

Is that possible, and how :oops:

thanks guys :bye:

  • Moderators
Posted

JeromeB,

Not as easy as you think as you will have to move all the controls as well as resizing the GUI - very CPU intensive. :oops:

Have you looked at the GuiExtender UDF in my sig? Although not quite what you have here, it might help in your project. :bye:

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

 

Posted

Ha, thats was what i'm thinked.

Any way, is there is an easy possibility to do that per the right.

I mean, take my exemple with full GUI, and then resize to only keep button

Maybe a dumb question but i cant get it work xD

  • Moderators
Posted

JeromeB,

Did you look at my UDF? :oops:

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

 

Posted (edited)

Yup :oops:

I have test some exemple, but i like the effect given by the winmove.

Is this is possible with it ?

edit : Testing your idf atm, i like it but, i dont find the way to resize on horizontal way, only vertical using

$iCode_Section = _GUIExtender_Section_Start(0, 40)

_GUIExtender_Section_Action($iCode_Section)

Edited by JeromeB
  • Moderators
Posted

JeromeB,

I mean, take my exemple with full GUI, and then resize to only keep button

That is easy, just reverse the expansion: :oops:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("GUIResizeMode", $GUI_DOCKALL)

$Form1 = GUICreate("Form1", 375, 180, -1, -1)
$Button1 = GUICtrlCreateButton("Bigger", 16, 48, 75, 25)
$Input1 = GUICtrlCreateInput("", 16, 16, 121, 21)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 248, 16, 81, 17)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 248, 48, 81, 17)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 248, 80, 81, 17)
$Radio1 = GUICtrlCreateRadio("Radio1", 16, 128, 65, 17)
$Radio2 = GUICtrlCreateRadio("Radio2", 88, 128, 65, 17)
$Radio3 = GUICtrlCreateRadio("Radio3", 176, 128, 65, 17)
GUISetState(@SW_SHOW)

$Size = WinGetPos($Form1)
WinMove ( $Form1, "", $Size[0], $Size[1], 190, 125, 1)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            Switch GUICtrlRead($Button1)
                Case "Bigger"
                    For $i = 190 To 350
                        WinMove ( $Form1, "", $Size[0], $Size[1], $i, 125, 1 )
                    Next
                    For $i = 125 To 200
                        WinMove ( $Form1, "", $Size[0], $Size[1], 350, $i, 1 )
                    Next
                    GUICtrlSetData($Button1, "Smaller")
                Case "Smaller"
                    For $i = 200 To 125 Step -1
                        WinMove ( $Form1, "", $Size[0], $Size[1], 350, $i, 1 )
                    Next
                    For $i = 350 To 190 Step -1
                        WinMove ( $Form1, "", $Size[0], $Size[1], $i, 125, 1 )
                    Next
                    GUICtrlSetData($Button1, "Bigger")
            EndSwitch
    EndSwitch
WEnd

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

 

  • Moderators
Posted

JeromeB,

It only works in one orientation - either vertically or horizontally. That is why you have the $iOrient parameter in the _GUIExtender_Init call to set the one you want: :bye:

_GUIExtender_Init($hWnd, $iOrient = 0, $iFixed = 0)

I did try to make in work in both directions, but it got too difficult. One day perhaps.....:oops:

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

 

  • Moderators
Posted

JeromeB,

Il n'y a pas de quoi. :oops:

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

 

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
×
×
  • Create New...