J0ker Posted March 11, 2007 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
Chobyhy Posted March 11, 2007 Posted March 11, 2007 Hmm have you tried $Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30, 0x0001)
Moderators SmOke_N Posted March 11, 2007 Moderators 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.
Mosquitos Posted March 11, 2007 Posted March 11, 2007 $Input_1 = GuiCtrlCreateInput("", 30, 20, 330, 30, $ES_CENTER) Sapiente vince, rex, noli vincere ferro!
J0ker Posted March 11, 2007 Author 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
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