TheDcoder Posted October 26, 2015 Share Posted October 26, 2015 Hello! , I was wondering if something like this:is possible to in AutoIt? The search text will disappear ASA the user types a letter in the input box... Is it possible? How? Here is some code for you to work on:#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 393, 130, 192, 124) $Input1 = GUICtrlCreateInput("", 88, 48, 209, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndThanks in Advance, TD P.S ASA = As soon asAre you wondering about the image which I provided above? I made it with a very careful forgery EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
ahmet Posted October 26, 2015 Share Posted October 26, 2015 (edited) _GUICtrlEdit_SetCueBanner() Edited October 26, 2015 by ahmet TheDcoder 1 Link to comment Share on other sites More sharing options...
kcvinu Posted October 26, 2015 Share Posted October 26, 2015 I have avoided this function only because of it's name. I don't know what cue banner means. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TheDcoder Posted October 27, 2015 Author Share Posted October 27, 2015 Thanks alot @ahmet! , This code works for me:#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIEdit.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 393, 130, 192, 124) $Input1 = GUICtrlCreateInput("", 88, 48, 209, 21) _GUICtrlEdit_SetCueBanner($Input1, "Semi-transparent text AKA Cue Banner!!!", True) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndTD EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
ahmet Posted October 27, 2015 Share Posted October 27, 2015 @TheDcoder, you are welcome Link to comment Share on other sites More sharing options...
GordonFreeman Posted October 28, 2015 Share Posted October 28, 2015 (edited) Anddddddd without a func if someone want:GUICtrlSendMsg(-1, 0x1501, 0, "Username")Well, i learned something when help!! xDIf you change 0 to 1 in code above the gray text not disappear when are focused (very interesting) Edited October 28, 2015 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
TheDcoder Posted October 28, 2015 Author Share Posted October 28, 2015 @GordonFreeman Did you try it? it does not work for me EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
GordonFreeman Posted October 28, 2015 Share Posted October 28, 2015 (edited) Yeah, i just put this code below a input control and it works nice!Windows 7 - SP1 - 32 Bits I have a folder called examples were i save au3 of these little tricks.Sooner or later we always need xD Edited October 28, 2015 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
TheDcoder Posted October 28, 2015 Author Share Posted October 28, 2015 I guess the "bit" is the problem, I am using 64-bit Win 8.1 EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
ahmet Posted October 28, 2015 Share Posted October 28, 2015 @GordonFreeman value 0x1501 equals the message EM_SETCUEBANNER, and the parameters are explained here. You can also look at the implementation of _GUICtrlEdit_SetCueBanner 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