oceanwind Posted November 26, 2017 Posted November 26, 2017 Hi All: How to set the input border color? tks in advance
Moderators Melba23 Posted November 26, 2017 Moderators Posted November 26, 2017 oceanwind, I usually use an overlaid label like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cLabel = GUICtrlCreateLabel("", 9, 9, 202, 22) GUICtrlSetState($cLabel, $GUI_DISABLE) GUICtrlSetBkColor($cLabel, 0xFF0000) $cInput = GUICtrlCreateInput("", 10, 10, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 edumanilha and oceanwind 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
oceanwind Posted November 26, 2017 Author Posted November 26, 2017 (edited) hi M23, Tks for your quick answer.Your idea is nice ,but in dark background,the input borders is visable and look not good. Maybe this is involved in somthing like SDk or DLLcall? Edited November 26, 2017 by Melba23 Removed quote
argumentum Posted November 26, 2017 Posted November 26, 2017 8 hours ago, oceanwind said: input borders is visable and look not good #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cLabel = GUICtrlCreateLabel("", 9, 9, 202, 22) GUICtrlSetState($cLabel, $GUI_DISABLE) GUICtrlSetBkColor($cLabel, 0xFF0000) $cInput = GUICtrlCreateInput("", 10, 10, 200, 20, -1, 0) ; <------ GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() Exit EndSwitch WEnd oceanwind and Skysnake 2 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
oceanwind Posted November 27, 2017 Author Posted November 27, 2017 9 hours ago, argumentum said: It's nice to use the 0 as the Extended Styles ,but I can't located in the Extended Style list.
argumentum Posted November 27, 2017 Posted November 27, 2017 (edited) 9 minutes ago, oceanwind said: but I can't located I'm not really good at this, what @Melba23 gave you is it. I just added the no border you wanted. Play around with Koda. Koda is included with the editor. From within the editor, you can press Alt-M to bring it up. ( if you are editing an AU3 script ) Edited November 27, 2017 by argumentum clarify oceanwind 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
oceanwind Posted November 27, 2017 Author Posted November 27, 2017 2 minutes ago, argumentum said: tks argumentum 1
Skysnake Posted November 27, 2017 Posted November 27, 2017 I have been playing with something very different, but perhaps this will work for you. This uses a very old HTML trick where you take 1x1 pixel image file which you stretch the length you want. You can make your own _color_????.jpg files... The While loop here is not a good implementation, but its about showing the use of the color files... expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: Skysnake Script Function: Sometimes it is necessary to display color in GUIs - often graphic color overhead is not required - Make 1x1 pixel color files - Read and display those colors #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <File.au3> Example() Func Example() ; read all _color_??? image files to array Local $aColorFileList = _FileListToArray(@ScriptDir, "_color_*") #comments-start -- uncomment this section for debug info ; Display the results returned by _FileListToArray. _ArrayDisplay($aColorFileList, "$aFileList") ConsoleWrite("Show comment with trailing text issue" & @CRLF) #comments-end -- uncomment this section for debug info ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 400, 100) Local $thePic = GUICtrlCreatePic("", 0, 0, 400, 4) ; LTWH Local $thePicL = GUICtrlCreatePic("", 0, 0, 4, 100) ; LTWH Local $theColorname = GUICtrlCreateLabel("", 8, 8, 400, 20) ; LTWH ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Display the child GUI. GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch For $c = 1 To UBound($aColorFileList) - 1 GUICtrlSetImage($thePic, $aColorFileList[$c]) GUICtrlSetImage($thePicL, $aColorFileList[$c]) GUICtrlSetData($theColorname, StringMid($aColorFileList[$c], 8)) ;~ ConsoleWrite("$aColorFileList[$c][0]" &$aColorFileList[$c]& @CRLF) Sleep(2500) Next WEnd ; Delete the previous GUIs and all controls. GUIDelete($hGUI) EndFunc ;==>Example The zip file includes this code and three _color_???.jpegs. Download: colorme.7z Skysnake oceanwind 1 Skysnake Why is the snake in the sky?
oceanwind Posted November 27, 2017 Author Posted November 27, 2017 5 hours ago, Skysnake said: Greate idea,thanks.
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