Jump to content

Recommended Posts

Posted

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!

Posted

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!

Posted

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.
Posted (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 by TSO
Posted

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)

NEWHeader1.png

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

NEWHeader1.png

Posted

Set the style to $ES_READONLY, then use GUICtrlSetBkColor.

That's it!

Valuater, not quiiite the same thing, but thanks for your help :)

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
  • Recently Browsing   0 members

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