Jump to content

GuiExtender problem


Recommended Posts

  • Moderators

antonioj84,

No need to "hack" anything, the UDF works just fine with borderless GUIs:

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

#include "GUIExtender.au3"

#include <SendMessage.au3>

Global Const $SC_DRAGMOVE = 0xF012

HotKeySet("{ESC}", "_Exit")

$hGUI = GUICreate("Vertical", 300, 390, 100, 100, BitOR($WS_POPUP, $WS_BORDER))
GUISetBkColor(0xFF0000, $hGUI)

_GUIExtender_Init($hGUI)

_GUIExtender_Section_Create($hGUI, 0, 60)
GUICtrlCreateGroup(" 1 - Static ", 10, 10, 280, 50)
; Create action button for next section
_GUIExtender_Section_Activate($hGUI, 2, "", "", 270, 40, 15, 15) ; Normal button
; Create native controls within the section creation structure - before starting next section
$cButton_1 = GUICtrlCreateButton("Toggle All", 20, 25, 80, 20)

_GUIExtender_Section_Create($hGUI, Default, 110) ; using Default for position follows on from previous sections
GUICtrlCreateGroup(" 2 - Extendable ", 10, 70, 280, 100)

_GUIExtender_Section_Create($hGUI, -1, 60) ; As does -1
GUICtrlCreateGroup(" 3 - Static", 10, 180, 280, 50)
_GUIExtender_Section_Activate($hGUI, 4, "Close 4", "Open 4", 125, 195, 60, 20, 1) ; Push button

_GUIExtender_Section_Create($hGUI, -1, 60)
GUICtrlCreateGroup(" 4 - Extendable ", 10, 240, 280, 50)

_GUIExtender_Section_Create($hGUI) ; using the default values for both location and size fills the remainder of the GUI
GUICtrlCreateGroup(" 5 - Static", 10, 300, 280, 80)
; Create and action button for all sections
_GUIExtender_Section_Activate($hGUI, 0, "Close All", "Open All", 20, 340, 60, 20) ; Normal button

; Close section creation
_GUIExtender_Section_Create($hGUI, -99)

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

_GUIExtender_Section_Action($hGUI, 4, 0)

GUISetState()

While 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $GUI_EVENT_PRIMARYDOWN
            _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
        Case $cButton_1
            _GUIExtender_Section_Action($hGUI, 0, 9) ; Mode 9 = toggle all moveable sections
    EndSwitch

    _GUIExtender_EventMonitor($hGUI, $iMsg) ; Check for click on section action control

WEnd

Func _Exit()
    Exit
EndFunc

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

 

Link to comment
Share on other sites

thanks you are correct , i had to comment these 2 lines in my menu and i had borderless menu. 

;$iStyle2 = BitOR($WS_MAXIMIZEBOX, $WS_CAPTION, $WS_SYSMENU) ; Style without minimize box
;GUISetStyle($iStyle2)

 

Edited by antonioj84
error
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

×
×
  • Create New...