Hallo,
ich hatte mir mal die Reabr funktionen angeschaut aber irgendwie schaff ich es nicht, das z.b beim klicken auf dem speicherbutton z.b eine msgbox geöffnent wird.
wie mach ich das?
Spoiler anzeigen
#include <GuiReBar.au3>
#include <GuiToolBar.au3>
#include <GuiComboBox.au3>
#include <GuiDateTimePicker.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiConstantsEx.au3>
Opt("MustDeclareVars", 1)
[/autoit] [autoit][/autoit] [autoit]$Debug_RB = False
[/autoit] [autoit][/autoit] [autoit]Global $hReBar
[/autoit] [autoit][/autoit] [autoit]_Main()
[/autoit] [autoit][/autoit] [autoit]Func _Main()
Local $hgui, $btnExit, $hToolbar, $hCombo, $hDTP, $hInput
Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp
$hgui = GUICreate("Rebar", 400, 396, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_MAXIMIZEBOX))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; create the rebar control
$hReBar = _GUICtrlReBar_Create($hgui, BitOR($CCS_TOP, $WS_BORDER, $RBS_VARHEIGHT, $RBS_AUTOSIZE, $RBS_BANDBORDERS))
; create a toolbar to put in the rebar
$hToolbar = _GUICtrlToolBar_Create($hgui, BitOR($TBSTYLE_FLAT, $CCS_NORESIZE, $CCS_NOPARENTALIGN))
; Add standard system bitmaps
Switch _GUICtrlToolbar_GetBitmapFlags($hToolbar)
Case 0
_GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_SMALL_COLOR)
Case 2
_GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)
EndSwitch
; Add buttons
_GUICtrlToolbar_AddButton($hToolbar, $idNew, $STD_FILENEW)
_GUICtrlToolbar_AddButton($hToolbar, $idOpen, $STD_FILEOPEN)
_GUICtrlToolbar_AddButton($hToolbar, $idSave, $STD_FILESAVE)
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP)
; create a combobox to put in the rebar
$hCombo = _GUICtrlComboBox_Create($hgui, "", 0, 0, 120)
_GUICtrlComboBox_BeginUpdate($hCombo)
_GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.exe")
_GUICtrlComboBox_EndUpdate($hCombo)
; 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)
; default for add is append
; add band with control
_GUICtrlReBar_AddBand($hReBar, $hCombo, 120, 200, "Dir *.exe")
; add band with date time picker
_GUICtrlReBar_AddBand($hReBar, $hDTP, 120)
; add band with toolbar to begining of rebar
_GUICtrlReBar_AddToolBarBand($hReBar, $hToolbar, "", 0)
;add another control
_GUICtrlReBar_AddBand($hReBar, GUICtrlGetHandle($hInput), 120, 200, "Name:")
$btnExit = GUICtrlCreateButton("Exit", 150, 360, 100, 25)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $btnExit
Exit
EndSwitch
WEnd
EndFunc ;==>_Main
bernd670: Spoiler-Tags gesetzt!