orbs Posted August 1 Posted August 1 how to create a label with the text fading from left to right, so at the end of the label, the text is barely visible, like so: this image is a mockup i made in PowerPoint, by putting a gradient transparency rectangle over a normal text box. perhaps this technique is applicable in AutoIt? graphics is not my forte. thanks for any advice! Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
Nine Posted Tuesday at 10:00 PM Posted Tuesday at 10:00 PM (edited) Here one way : ; From Nine #include <GDIPlus.au3> #include <GUIConstants.au3> Opt("MustDeclareVars", True) Example() Func Example() _GDIPlus_Startup() Local $hGUI = GUICreate("Example", 400, 400) GUISetState() Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF) Local $hBrush = _GDIPlus_LineBrushCreate(50, 200, 320, 200, 0xFF000000, 0xFFFFFFFF) Local $hFormat = _GDIPlus_StringFormatCreate() Local $hFamily = _GDIPlus_FontFamilyCreate("Arial") Local $hFont = _GDIPlus_FontCreate($hFamily, 28, 2) Local $tLayout = _GDIPlus_RectFCreate(80, 100, 320, 40) Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, "AutoIt Rulez !", $hFont, $tLayout, $hFormat) _GDIPlus_GraphicsDrawStringEx($hGraphic, "AutoIt Rulez !", $hFont, $aInfo[0], $hFormat, $hBrush) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_FontDispose($hFont) _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Example Edited Tuesday at 10:05 PM by Nine spudw2k and ioa747 2 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
orbs Posted Wednesday at 04:19 PM Author Posted Wednesday at 04:19 PM (edited) thank you, that looks nice! i'm now trying to understand the process. is that a "graphic" control that occupies the entire GUI? i'm asking because if i try to set a background color to the GUI, it does not show: GUISetBkColor($COLOR_YELLOW) ; ^^ not visible. the graphic object takes up the entire GUI? Edited Wednesday at 04:19 PM by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
Nine Posted Wednesday at 06:15 PM Posted Wednesday at 06:15 PM 1 hour ago, orbs said: is that a "graphic" control that occupies the entire GUI? Yes it is just an example. I made it like that to simplify the code. To color the background, replace the line with yellow color : _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFF00) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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