Jump to content

Recommended Posts

Posted

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?

Posted

It's been a while but I don't think you can change the text of buttons that use a bitmap. You can add text to the bitmap before you set it to the button, like UEZ does in this topic

 

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
×
×
  • Create New...