RE: Creating Palettes
- To: mathgroup at smc.vnet.net
- Subject: [mg86009] RE: [mg85967] Creating Palettes
- From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
- Date: Sat, 1 Mar 2008 04:46:32 -0500 (EST)
- References: <200802291118.GAA19113@smc.vnet.net>
Hello!
I'm also struggling with Palettes... but I think I can help.
First : It is still possible to generate a palette from selection. It is =
in the "Palette" menu!
To obtain parentheses, you can use "Button" instead of PasteButton:
CreatePalette[{PasteButton[a^2],
PasteButton[b^2],
PasteButton[a^3],
PasteButton[b^3],
Button["(1-a)",NotebookWrite[InputNotebook[],"(1-a)"],Appearance-> =
"Palette"],
Button["(1-b)",NotebookWrite[InputNotebook[],"(1-b)"],Appearance-> =
"Palette"],
PasteButton[(1 - a)^2],
PasteButton[(1 - b)^2],
PasteButton[(1 - a)^3],
PasteButton[(1 - b)^3]}];
Best regards
Florian Jaccard
-----Message d'origine-----
De=A0: DOD [mailto:dcodea at gmail.com]
Envoy=E9=A0: vendredi, 29. f=E9vrier 2008 12:18
=C0=A0: mathgroup at smc.vnet.net
Objet=A0: [mg85967] Creating Palettes
I've just tried to create a palette in v6, it is much harder than it
was in v5- is there a reason I can no longer "create a palette" from
the edit menu, and then "generate from selection"? Anyway, I figured
out the tedious way to do it v6, but it won't create buttons I want:
CreatePalette[{PasteButton[a^2], PasteButton[b^2],
PasteButton[a^3], PasteButton[b^3],
PasteButton[(1 - a)], PasteButton[(1 - b)],
PasteButton[(1 - a)^2], PasteButton[(1 - b)^2],
PasteButton[(1 - a)^3], PasteButton[(1 - b)^3]
}
];
The parentheses around "(1-a)" and "(1-b)" are never created when I
press the buttons, only "1-a" and "1-b", which is obviously a problem
if I'm multiplying things. This defeats the purpose of the palette
saving keystrokes. Is there anyway to do this?