Sign in to follow this  
Followers 0
Belini

Cut a piece of the GUI and then back to what it was before.

7 posts in this topic

want after opening the gui at one point cut a piece of it to hide an image and then increase the size again to display the image, how i can to do this?

Share this post


Link to post
Share on other sites



Belini,

If the section with the image runs either the full width or height of the GUI then my GUIExtender UDF is just what you need - the link is in my sig. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

@Melba23 i only managed to extend and retract the GUI by clicking on a control and what I need is to do this without clicking or control button.

Share this post


Link to post
Share on other sites

Belini,

You can extend and retract the sections programmatically by calling the _GUIExtender_Section_Extend directly - here it called by a couple of Adlib functions: ;)

#include <GUIConstantsEx.au3>

#include "GUIExtender.au3"

$hGUI = GUICreate("Vertical", 300, 390, 100, 100)

_GUIExtender_Init($hGUI)

_GUIExtender_Section_Start($hGUI, 0, 60)
GUICtrlCreateGroup(" 1 - Static ", 10, 10, 280, 50)
_GUIExtender_Section_Action($hGUI, 2) ; Make extendable
_GUIExtender_Section_End($hGUI)

_GUIExtender_Section_Start($hGUI, 60, 110)
GUICtrlCreateGroup(" 2 - Extendable ", 10, 70, 280, 100)
_GUIExtender_Section_End($hGUI)

_GUIExtender_Section_Start($hGUI, 170, 60)
GUICtrlCreateGroup(" 3 - Static", 10, 180, 280, 50)
_GUIExtender_Section_Action($hGUI, 4) ; Make extendable
_GUIExtender_Section_End($hGUI)

_GUIExtender_Section_Start($hGUI, 230, 60)
GUICtrlCreateGroup(" 4 - Extendable ", 10, 240, 280, 50)
_GUIExtender_Section_End($hGUI)

_GUIExtender_Section_Start($hGUI, 290, 90)
GUICtrlCreateGroup(" 5 - Static", 10, 300, 280, 80)
_GUIExtender_Section_End($hGUI)

GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISetState()

AdlibRegister("_Extend_2", 5000)
AdlibRegister("_Extend_4", 7000)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func _Extend_2()
    Static Local $bState = True
    $bState = Not $bState
    _GUIExtender_Section_Extend($hGUI, 2, $bState)
EndFunc

Func _Extend_4()
    Static Local $bState = True
    $bState = Not $bState
    _GUIExtender_Section_Extend($hGUI, 4, $bState)
EndFunc
All clear? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
 
 
 
 
 
now work as I need, thank you @ Melba23
#include <GUIConstantsEx.au3>
#include "GUIExtender.au3"

Global $bState = False
$hGUI = GUICreate("Vertical", 300, 180, 100, 100)

_GUIExtender_Init($hGUI)

_GUIExtender_Section_Start($hGUI, 0, 60)
GUICtrlCreateGroup(" 1 - Static ", 10, 10, 280, 50)
_GUIExtender_Section_Action($hGUI, 2) ; Make extendable
_GUIExtender_Section_End($hGUI)

_GUIExtender_Section_Start($hGUI, 60, 110)
GUICtrlCreateGroup(" 2 - Extendable ", 10, 70, 280, 100)
_GUIExtender_Section_End($hGUI)

GUISetState()

AdlibRegister("_Extend", 1000)

Func _Extend()
    If $bState = True Then
        $bState = False
    Else
        $bState = True
    EndIf
    _GUIExtender_Section_Extend($hGUI, 2, $bState)
EndFunc   ;==>_Extend

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Belini,

 

If $bState = True Then
        $bState = False
Else
        $bState = True
EndIf
Why not use the more compact syntax from my example: ;)

$bState = Not $bState
M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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  
Followers 0