Button on a palette to create new text cells
- To: mathgroup at smc.vnet.net
- Subject: [mg77967] Button on a palette to create new text cells
- From: Donald DuBois <donabc at comcast.net>
- Date: Wed, 20 Jun 2007 05:45:33 -0400 (EDT)
I am trying to create a palette that has a button
on it which, when clicked, will create a new text cell
right under the cursor in the selected notebook and this cell will have a given background color, font family and font size. The closest I have
been able to get to this goal are the following
Button["New Txt Cell", FrontEndExecute[FrontEndToken[SelectedNotebook, "SimilarCellBelow"]]]
This creates a new cell which I hoped to be able to modify to
be of Style "Text" with a given background color, font family and size but have not been able to do so.
The style stays the same as the previous cell - whatever that may have been - and I don't seem to be able to change that.
There is no token other than "SimilarCellBelow" that I have found that seems capable of generating a new cell
which is why I am trying to modify what it does.
The general application is to be able to easily add text cells for comments in a notebook without having to select the cell, and go to the Format pull down menu
and then click on a style.
Any suggestions would be creatly appreciated.
Prev by Date:
Simple ODE with time-dep BC
Next by Date:
Re: Rule and Module not working together
Previous by thread:
Re: Simple ODE with time-dep BC
Next by thread:
RE: Button on a palette to create new text cells