TSO Posted June 18, 2008 Share Posted June 18, 2008 Is there a way to keep people from editing an input box and still have the font show clearly? I am currently using GUICtrlSetState(-1, $GUI_DISABLE) for input boxes, but it greys the text and makes it a little difficult to read given the backround color I'm using. Thanks! Link to comment Share on other sites More sharing options...
monoceres Posted June 18, 2008 Share Posted June 18, 2008 Is there a way to keep people from editing an input box and still have the font show clearly?I am currently using GUICtrlSetState(-1, $GUI_DISABLE) for input boxes, but it greys the text and makes it a little difficult to read given the backround color I'm using. Thanks!Use GUICtrlSetBkColor() to set the same background color as the background color of you GUI. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
TSO Posted June 18, 2008 Author Share Posted June 18, 2008 Use GUICtrlSetBkColor() to set the same background color as the background color of you GUI.That's the thing though, I'm looking to use this other color intentionally... I just want the text to not have the 'disabled' look, while in fact being disabled. Link to comment Share on other sites More sharing options...
Valuater Posted June 18, 2008 Share Posted June 18, 2008 Maybe... #include <GUIConstantsEx.au3> #include <StaticConstants.au3> GUICreate("MY GUI") $Label = GUICtrlCreateLabel(" You can not change text here ", 20, 20, 200, 20, $SS_CENTER + $SS_CENTERIMAGE) GUICtrlSetBkColor(-1, 0x0ffffff ) GUISetState() Sleep(3000) GUICtrlSetData( $Label, " But... I can!!!") Sleep(5000) 8) Link to comment Share on other sites More sharing options...
TSO Posted June 18, 2008 Author Share Posted June 18, 2008 (edited) Maybe... #include <GUIConstantsEx.au3> #include <StaticConstants.au3> GUICreate("MY GUI") $Label = GUICtrlCreateLabel(" You can not change text here ", 20, 20, 200, 20, $SS_CENTER + $SS_CENTERIMAGE) GUICtrlSetBkColor(-1, 0x0ffffff ) GUISetState() Sleep(3000) GUICtrlSetData( $Label, " But... I can!!!") Sleep(5000) 8)hahaha.. Well, I'd really prefer to use an input box for what I'm doing. GUICtrlCreateInput as opposed to GUICtrlCreateLabel Edited June 18, 2008 by TSO Link to comment Share on other sites More sharing options...
Valuater Posted June 18, 2008 Share Posted June 18, 2008 Is there a way to keep people from editing an input box and still have the font show clearly? I answered that question... so why do you want an "input" when you won't allow the user to change anything??? .... just doesn't make sense.... 8) Link to comment Share on other sites More sharing options...
NELyon Posted June 18, 2008 Share Posted June 18, 2008 Set the style to $ES_READONLY, then use GUICtrlSetBkColor. Link to comment Share on other sites More sharing options...
Valuater Posted June 18, 2008 Share Posted June 18, 2008 (edited) Set the style to $ES_READONLY, then use GUICtrlSetBkColor. Yea... it's basically the same thnig! #include <GUIConstantsEx.au3> #include <EditConstants.au3> GUICreate("MY GUI") $Input = GUICtrlCreateInput(" You can not change text here ", 20, 20, 200, 20, $ES_READONLY) GUICtrlSetBkColor(-1, 0x0ffffff ) GUISetState() Sleep(5000) GUICtrlSetData( $Input, " But... I can!!!") Sleep(5000) 8) Edited June 18, 2008 by Valuater Link to comment Share on other sites More sharing options...
TSO Posted June 19, 2008 Author Share Posted June 19, 2008 Set the style to $ES_READONLY, then use GUICtrlSetBkColor.That's it!Valuater, not quiiite the same thing, but thanks for your help 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