metis Posted July 13, 2012 Share Posted July 13, 2012 Hi i need help in me code. I need when click my input he clear or text in background in my input, my code not working $code = GUICtrlCreateInput("PIN CODE", 8, 64, 137, 21) ;..... GUICtrlSetOnEvent($code, "func_code_clear") ;...... Func func_code_clear() GUICtrlSetData($code,"") EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 13, 2012 Moderators Share Posted July 13, 2012 metis,It sounds as if a "cuebanner" is what you need: #include <GUIConstantsEX.au3> #include <EditConstants.au3> #include <WinAPI.au3> $hGui = GUICreate("", 500, 300) GUICtrlCreateLabel("Info", 10, 5) Local $aInput[6][2] = [[0, "Name"],[0, "Address"],[0, "Home Phone"],[0, "Mobile Phone"],[0, "Date of birth"],[0, "Town"]] For $i = 0 To UBound($aInput) - 1 $aInput[$i][0] = GUICtrlCreateInput("", 10, (20 * ($i + 1)), 140, 20) GUICtrlSendMsg(-1, $EM_SETCUEBANNER, True, $aInput[$i][1]) Next GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd ;Does not work for edit controls with $ES_MULTILINE style. ;In XP, the banner disappears when the edit has focus (cursor in edit) ;In Vista/7 the banner can optionally still appear when the edit has focus (cursor in edit) ;(third parameter = True/False)Was I right? M23 metis and JoeBar 2 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
metis Posted July 13, 2012 Author Share Posted July 13, 2012 (edited) Thx men In my XP is Works. (Have HomePremium and Profesional SP3 ) Edited July 13, 2012 by metis 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