Aprilgogo Posted June 18, 2008 Share Posted June 18, 2008 Hi, I was using GUICtrlCreateButton() to draw an onscreen keyboard, in which every button stands for a key. Usually the key "1" has "!" in the upper side and "1" in the bottom. So I tried: $KEY_1 = GUICtrlCreateButton("!"&@CRLF&"1", ...) But it didn't work. Actually it showed just "!1". Could someone please tell me how to make it work or some better ways to draw an onscreen keyboard? Thank you! Link to comment Share on other sites More sharing options...
ProgAndy Posted June 18, 2008 Share Posted June 18, 2008 You have to add the Style $BS_MULTILINE 0x2000 Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Aprilgogo Posted June 18, 2008 Author Share Posted June 18, 2008 You have to add the Style $BS_MULTILINE 0x2000 Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle. Yes, it works! Here's the code: $KEY_1 = GUICtrlCreateButton(" ! 1", ...) GUICtrlSetStyle($KEY_1, $BS_MULTILINE) Thank you! Link to comment Share on other sites More sharing options...
Aprilgogo Posted June 19, 2008 Author Share Posted June 19, 2008 Yes, it works! Here's the code: $KEY_1 = GUICtrlCreateButton(" ! 1", ...) GUICtrlSetStyle($KEY_1, $BS_MULTILINE) Thank you! Just got it, a better way: $KEY_1 = GUICtrlCreateButton("!" & @CRLF & "1", ...) GUICtrlSetStyle($KEY_1, $BS_MULTILINE) Thank you! Link to comment Share on other sites More sharing options...
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