Jump to content

How to change text color on a button with image?


misioooo
 Share

Recommended Posts

Hi!

 

I am writing some GUI and i need to use images as buttons, but with text on them (text is from INI file).

Part with button looks like this:

$ankieta1 = GUICtrlCreateButton($txtAnk1, 100,350,765,164)
        GUICtrlSetFont(-1, 22, 800, -1, "Arial")
        ;GUICtrlSetColor(-1,0xffffff)
        $hImageBtn_1 = _GUIImageList_Create(765, 164)
        _GUIImageList_AddBitmap($hImageBtn_1, "c:\path\to\ankieta_clean.bmp")
        _GUICtrlButton_SetImageList($ankieta1, $hImageBtn_1, 4)
        GUICtrlSetOnEvent(-1, "On_Ankieta1")

The problem - if i uncomment GUICtrlSetColor, color of text changes, but button is just plain gray (no image). How i can change text color not touching image on a button here?

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

×
×
  • Create New...