Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7749

Re: How to create palette buttons with tooltips?

From John Fultz <jfultz@wolfram.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to create palette buttons with tooltips?
Date 2012-01-11 22:22 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jel22l$lli$1@smc.vnet.net> (permalink)

Show all headers | View raw


The tooltip option can easily be migrated to the notebook level, where it'll
affect everything in the notebook:

CreatePalette[
 Tooltip[Button["Button", Appearance -> "Palette"], "Tooltip"], 
 TooltipBoxOptions -> {TooltipDelay -> Automatic}]

Unfortunately, Button's Appearance option cannot benefit from a similar 
treatment because Button[], by default, hardcodes the value of 
ButtonBoxOptions->{Appearance->Automatic} at the ButtonBox level, which 
overrides anything specified at the notebook level (there has been discussion 
about changing this in future versions).

I would suggest just making a function called PaletteButton which creates a
Button with the right options.

Sincerely,

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


On Wed, 11 Jan 2012 06:00:43 -0500 (EST), Szabolcs wrote:
> What is the most convenient way to create palette buttons with tooltips
> that use the OS-wide tooltip delay?
>
> Currently I am using
>
> CreatePalette@
> Tooltip[Button["Button", Appearance -> "Palette"], "Tooltip",
> TooltipDelay -> Automatic]
>
> But this seems like a lot of work (both TooltipDelay -> Automatic and
> Appearance -> "Palette" needed) just to get the behvaiour which could be
> expected as a default from a palette.
>
> When I have several buttons, what's the simplest and most concise way to
> do this?


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How to create palette buttons with tooltips? John Fultz <jfultz@wolfram.com> - 2012-01-11 22:22 +0000

csiph-web