Jump to content
Sign in to follow this  
jennico

combo right aligned ?

Recommended Posts

jennico

$ES_RIGHT doesn't work, how to get combobox items right aligned ?

thx j.


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites
Authenticity

You mean $WS_EX_RIGHT.

Share this post


Link to post
Share on other sites
jennico

dude, where did you find that $WS_EX_RIGHT ?

but it does not really solve the problem, since the dropdown handle is to the left now.

no possibility to just right align the text ?

j.


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites
jennico

found something in vb:

Set the CB's RightToLeft property to True

Me.ComboBox1.RightToLeft = Windows.Forms.RightToLeft.Yes

this can be realized from the combo's context menu.

but how to do this in autoit ?

Edited by jennico

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites
jennico

no. this is the same as $WS_EX_RIGHT.

google says it's not possible, right aligning in combobox. :D


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites
Authenticity

Hmm... What about this?

#include <EditConstants.au3>
#include <WindowsConstants.au3>

Dim $hGUI = GUICreate('Test', 200, 300)
Dim $ComboBox = GUICtrlCreateCombo('', 0, 0, 200, 200, -1, $WS_EX_RIGHT)
Dim $Edit = GUICtrlCreateEdit('', 10, 210, 180, 23, BitAND($GUI_SS_DEFAULT_EDIT, BitNOT($WS_HSCROLL)))
Dim $Button = GUICtrlCreateButton('Te&st', 70, 250, 60, 23)
GUICtrlSetData($ComboBox, '1|abc|00|## | 03 01|2          ')

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $Button
            Local $sStr = GUICtrlRead($Edit)
            If $sStr <> '' Then GUICtrlSetData($ComboBox, $sStr & '|')
        
        Case -3
            ExitLoop
    EndSwitch
    
    Sleep(40)
WEnd
GUIDelete()

Share this post


Link to post
Share on other sites
jennico

yes, that's the only thing one can do. not quite what i attempted but thank you.

i've searched other forums and this natively seems not to be featured for combos. only thing is to use RightToLeft display if you have installed the foreign languages.

j.


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

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  

×