Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Color - Appearance of Buttons

9 views
Skip to first unread message

Jakob Ebner

unread,
Nov 25, 2011, 5:12:02 AM11/25/11
to
If I change the Background of a button to a different color it has
this "old" M5 style, see the difference between
Button["test", None]
Button["test", None, Background -> Orange]

Is there a way to keep the styling for different colors and/or to
change the color when you hover over the button?

Jakob Ebner

Armand Tamzarian

unread,
Nov 26, 2011, 5:11:51 AM11/26/11
to
This will do it:

Mouseover[
Button["Click Here", Print[10!], Background -> Red],
Button["Click Here", Print[10!], Background -> Blue]
]

Mike

John Fultz

unread,
Nov 26, 2011, 5:13:54 AM11/26/11
to
On Fri, 25 Nov 2011 04:59:56 -0500 (EST), Jakob Ebner wrote:
> If I change the Background of a button to a different color it has
> this "old" M5 style, see the difference between
> Button["test", None]
> Button["test", None, Background -> Orange]
>
> Is there a way to keep the styling for different colors and/or to
> change the color when you hover over the button?
>
> Jakob Ebner

The modern visual styling of buttons is painted by the operating system, and the
operating system has no way of setting the colors on a button-by-button basis
(although some operating systems allow global setting of "themes" that may
affect this). We've deliberately chosen to allow the operating system to handle
this case rather than trying to emulate what the operating system does and play
a game of "follow the leader" as new versions of the OS come out.

And, frankly, I'm not even sure what the rules should be for arbitrary colors
for a modern Windows or Mac system (how to treat the gradients, what should the
pressed appearance look like, how should default buttons distinguish themselves,
what should mouseover appearances be, etc.). And so, we've let the historical
implementation stay unchanged.

Sincerely,

John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.

0 new messages