Jump to content

Text in GUICtrlCreateInput


TSO
 Share

Recommended Posts

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

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

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

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 by TSO
Link to comment
Share on other sites

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...