Need to change the text color of the button in a specific state. (Issue #26470)

14 views
Skip to first unread message

wuangluangzhusr

unread,
May 16, 2026, 9:11:41 AM (3 days ago) May 16
to wx-...@googlegroups.com, Subscribed
wuangluangzhusr created an issue (wxWidgets/wxWidgets#26470)

Description

I am teaching children to recognize vegetables and want to create an application with the following effect: there are some vegetable buttons, and when a child moves the mouse over a button, the text on the button changes to the color of the vegetable. I found that wxButton has a SetForegroundColour function that can set the text color, but this is not the effect I want. I only need the text color to change when the mouse hovers over it.

I need the button to be black in the normal state, and in the current state or pressed state, the button should be a vegetable color, as shown in the image below. But I haven't found a corresponding implementation method.

1.gif (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26470@github.com>

VZ

unread,
May 16, 2026, 12:10:33 PM (3 days ago) May 16
to wx-...@googlegroups.com, Subscribed

Closed #26470 as duplicate.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/26470/issue_event/25610967974@github.com>

VZ

unread,
May 16, 2026, 12:10:35 PM (3 days ago) May 16
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26470)

This is the same as #26453, right?

As discussed there, currently you would need to use bitmaps (you can create a bitmap with text of your choice) to control per-state colour.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26470/4467378358@github.com>

Reply all
Reply to author
Forward
0 new messages