Kip Posted November 28, 2007 Posted November 28, 2007 hey, I'm exploring the new functions of autoit 3.2.10, but... How can i add multiple controls to a Rebar band? I know how to add buttons, but thats it. Thats the only object i can create with the toolbar UDF Now I wanna create, lets say: 2 Combos, and 1 button in one band. is it possible? thnx, chicken in a bucket (I thought something like this, but that creates 3 different bands:) #include <GUIConstants.au3> #include <GuiReBar.au3> $GUI = Guicreate("Rebar Example",800,400) $Bar = _GUICtrlReBar_Create($GUI,$CCS_TOP) $Fonts = GUICtrlCreateCombo("Times new Roman",0,0,100,20) $Size = GUICtrlCreateCombo("",0,0,30,20) GUICtrlSetData(-1,"6|8|9|10|11|12|14|16|18|20|24|36|48|72","12") $SetFont = GUICtrlCreateButton("Set",0,0,30,20) _GUICtrlReBar_AddBand($Bar, $Fonts, 120, 300, "Font") _GUICtrlReBar_AddBand($Bar, $Size, 120, 300, "Size") _GUICtrlReBar_AddBand($Bar, $SetFont, 120, 300, "") GUISetState() While 1 if GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
GaryFrost Posted November 28, 2007 Posted November 28, 2007 A rebar can contain multiple bands, each band can contain only 1 control. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Kip Posted November 28, 2007 Author Posted November 28, 2007 (edited) This contains multiple controls. Maybe i should ask the question on a different way; How can i add multiple controls to a toolbar $hReBar = _GUICtrlReBar_Create($hgui, $CCS_TOP) $hToolbar = _GUICtrlToolBar_Create($hgui) _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) _GUICtrlReBar_AddToolBarBand($hReBar, $hToolbar, "", 0) Edited November 28, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Kip Posted November 29, 2007 Author Posted November 29, 2007 kabumb! MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Kip Posted November 29, 2007 Author Posted November 29, 2007 30 minutes, and im already on the second page MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
GaryFrost Posted November 29, 2007 Posted November 29, 2007 This contains multiple controls. Maybe i should ask the question on a different way; How can i add multiple controls to a toolbar $hReBar = _GUICtrlReBar_Create($hgui, $CCS_TOP) $hToolbar = _GUICtrlToolBar_Create($hgui) _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) _GUICtrlReBar_AddToolBarBand($hReBar, $hToolbar, "", 0) Adding buttons to a toolbar and adding controls to a rebar band are 2 totally different things. You can create multiple toolbars, and add each one to a seperate band. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Kip Posted November 29, 2007 Author Posted November 29, 2007 Adding buttons to a toolbar and adding controls to a rebar band are 2 totally different things.not "totally" different thingsif you can add multiple controls to a toolbar, then you can add that toolbar to a band (_GUICtrlRebar_AddToolBarBand) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
GaryFrost Posted November 29, 2007 Posted November 29, 2007 not "totally" different thingsif you can add multiple controls to a toolbar, then you can add that toolbar to a band (_GUICtrlRebar_AddToolBarBand)Yes totally different, the reason for a function like _GUICtrlRebar_AddToolBarBand is it does some calculations for you so you don't have to figure out where the band should end.You can still only add 1 control per band.From MSDNAbout Rebar ControlsRebar controls act as containers for child windows. An application assigns child windows, which are often other controls, to a rebar control band. Rebar controls contain one or more bands, and each band can have any combination of a gripper bar, a bitmap, a text label, and a child window. However, bands cannot contain more than one child window. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Kip Posted November 29, 2007 Author Posted November 29, 2007 well, then i dont like the rebar object MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
GaryFrost Posted November 29, 2007 Posted November 29, 2007 well, then i dont like the rebar object Then don't use it. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now