Andreik Posted May 1, 2014 Posted May 1, 2014 Why the text it's not vertically aligned in toolbar control? #include <GuiReBar.au3> #include <GuiToolbar.au3> #include <Constants.au3> Global Enum $Item1 = 1000, $Item2, $Item3 Local $hGUI = GUICreate('Example',450,300) Local $hRebar = _GUICtrlRebar_Create($hGUI, BitOR($RBS_FIXEDORDER,$CCS_NODIVIDER,$RBS_BANDBORDERS)) Local $hToolbar = _GUICtrlToolbar_Create($hGUI,$TBSTYLE_TRANSPARENT) _GUICtrlToolbar_AddString($hToolbar,'Item# 1') _GUICtrlToolbar_AddString($hToolbar,'Item# 2') _GUICtrlToolbar_AddString($hToolbar,'Item# 3') _GUICtrlToolbar_AddButton($hToolbar,$Item1,-2,0) _GUICtrlToolbar_AddButton($hToolbar,$Item1,-2,1) _GUICtrlToolbar_AddButton($hToolbar,$Item1,-2,2) _GUICtrlToolbar_SetButtonSize($hToolbar,32,150) _GUICtrlRebar_AddToolBarBand($hRebar,$hToolbar) GUISetState(@SW_SHOW,$hGUI) Do Sleep(10) Until GUIGetMsg() = -3 ; GUI_EVENT_CLOSE The code above will prodoce a window that will look like
reb Posted May 1, 2014 Posted May 1, 2014 Would something like this be what you want? REB MEASURE TWICE - CUT ONCE
Andreik Posted May 1, 2014 Author Posted May 1, 2014 It's not related with what I asked. I just want to display the text vertically aligned.
Solution jguinch Posted May 1, 2014 Solution Posted May 1, 2014 Because of the size of your undefinied bitmaps : the text is placed under the bitmap, but you don't have any bitmap... So just define the size of the bitmaps - even if you do not use any Local $hToolbar = _GUICtrlToolbar_Create($hGUI,$TBSTYLE_TRANSPARENT) _GUICtrlToolbar_SetBitmapSize($hToolbar, 0, 0) Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Andreik Posted May 1, 2014 Author Posted May 1, 2014 Thank you, but this is weird. If I use just text then size of bitmaps should be by default 0. Anyway, many thanks.
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