J0ker Posted March 11, 2007 Share Posted March 11, 2007 How can I center the text in a gui input? I tried GuiCtrlSetStyle but there's no style that fit my need in the Gui control style section. #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 75,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30) GuiCtrlSetfont($Input_1,12) GUICtrlSetLimit($Input_1,29) GuiSetIcon(@AutoItExe, -1) GUICtrlSetStyle($Input_1 , ;HERE) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Link to comment Share on other sites More sharing options...
Chobyhy Posted March 11, 2007 Share Posted March 11, 2007 Hmm have you tried $Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30, 0x0001) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 11, 2007 Moderators Share Posted March 11, 2007 #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 200,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30, BitOR($ES_CENTER, $ES_MULTILINE)) GuiCtrlSetfont($Input_1,12) GUICtrlSetLimit($Input_1,29) GuiSetIcon(@AutoItExe, -1) GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Mosquitos Posted March 11, 2007 Share Posted March 11, 2007 $Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30, $ES_CENTER) Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
J0ker Posted March 11, 2007 Author Share Posted March 11, 2007 (edited) Hmm have you tried$Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30, 0x0001)Exactly what i was looking for ! thx Edited March 11, 2007 by J0ker 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