Jump to content
Sign in to follow this  

resizing rebar

Recommended Posts

I am trying to make a GUI with a rebar.  The problem I have is is that when the user adjusts the rebar vertically using a gripper, the gui controls get covered up. Id like to prevent the user from resizing the toolbar vertically, or very much preferably, reposition the controls anytime the progressbar has a vertical height change. Has anyone dealt with this before and could offer a solution?

#include <GuiReBar.au3>
#include <GuiComboBox.au3>
#include <GuiDateTimePicker.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Constants.au3>


Func Example()
    Local $hgui, $btnExit, $hCombo, $hReBar, $hDTP, $hInput

    $hgui = GUICreate("Rebar", 400, 396, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_MAXIMIZEBOX))

    ; create the rebar control

    ; create a combobox to put in the rebar
    $hCombo = _GUICtrlComboBox_Create($hgui, "", 0, 0, 120)

    _GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.exe")

    ; create a date time picker to put in the rebar
    $hDTP = _GUICtrlDTP_Create($hgui, 0, 0, 190)

    ; create a input box to put in the rebar
    $hInput = GUICtrlCreateInput("Input control", 0, 0, 120, 20)

    ; add band with control
    _GUICtrlRebar_AddBand($hReBar, $hCombo, 120, 200, "Dir *.exe")

    ; add and force to second row
    _GUICtrlRebar_AddBand($hReBar, $hDTP, 120)
    _GUICtrlRebar_SetBandStyleBreak($hReBar, 1)

    ; add to beginning of rebar
    _GUICtrlRebar_AddBand($hReBar, GUICtrlGetHandle($hInput), 120, 200, "Name:", 0)

    $btnExit = GUICtrlCreateButton("Exit", 150, 60, 100, 25)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $btnExit
EndFunc   ;==>Example

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  

  • Create New...