Sign in to follow this  
Followers 0
Andreik

Text alignment in toolbar control

5 posts in this topic

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

21l6edx.png


When the words fail... music speaks

Share this post


Link to post
Share on other sites



Would something like this be what you want?  

REB


MEASURE TWICE - CUT ONCE

Share this post


Link to post
Share on other sites

It's not related with what I asked. I just want to display the text vertically aligned.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

Thank you, but this is weird. If I use just text then size of bitmaps should be by default 0. Anyway, many thanks.


When the words fail... music speaks

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  
Followers 0

  • Similar Content

    • FroVN
      By FroVN
      Hi, i want read all text in website doc.google, link : https://docs.google.com/document/d/1ePaOK3w4mOi0fmOF7WQmF5kYvAXQtztVI7018wei_xs/edit (This is all my account , don't remember :v) how i read all text in this web? Tks
    • KimberlyJillPereira
      By KimberlyJillPereira
      I am a newbie in AutoIt. May I know what is the code used to expand the width and height of excel cells because I want to insert pictures in the cell.I tried AutoFit but that doesnt work as I cant specify for the width and height. Only for column width I could expand by using .ColumnWidth but for the row I am not able to expand the row? How to do?? What is the code used ??Please help me and thank you.
    • KimberlyJillPereira
      By KimberlyJillPereira
      I am a newbie in AutoIt. May I know what is the code used to expand the width and height of excel cells because I want to insert pictures in the cell.I tried AutoFit but that doesnt work as I cant specify for the width and height. Only for column width I could expand by using .ColumnWidth but for the row I am not able to expand the row? How to do?? What is the code used ??Please help me and thank you.
    • StMaSi
      By StMaSi
      Two questions...
      When presenting a form containing a richedit control, is there any way to make the displayed text, within said richedit control, non-selectable?
      In addition, is there any way to hide the vertical line cursor, within said richedit control?
      Thanx.
    • StMaSi
      By StMaSi
      Is there any way to embed characters/codes/data/etc. within a text file so that when the script reads the text file to populate the edit box, said characters/codes/data/etc. can let the script know this word needs to be capitalized, that word needs to be underscored, etc.?
      For example, the text file would contain something along these lines...
      <bold>This is the title</bold> This is a <italic>sample</italic> text file. This is <underscore>only</underscore> a text file. Does that make sense?
      Thanx.