> You need to specify the point or pixel size as part of the font:
> $tkcanvas itemconfigure text -fill red -font {Helvetica 16}  ;# points
> $tkcanvas itemconfigure text -fill red -font {Helvetica -16}  ;# negative is
> pixels

ah thats helpful thank you!

it might be too much but how about turning on/off gui-plugins directly from a patch by sending messages to pd?

also i did something like:

 proc RandomInteger1 {max} {
         return [expr {int(rand()*$max) + 1}]
 }

to randomize font size etc. right now when i open my patch i have to click on and off the patch to refresh.... is there just a refresh pd command i can send so i count refresh with a metro for example to create little animated randomized object boxes?

i thought you could send a [;pd refresh{ or something like that but i cant find it. am i crazy?

m


On Thu, Jan 24, 2013 at 4:30 PM, Hans-Christoph Steiner <hans@at.or.at> wrote:

Pd uses almost all of the available widgets in Tk:
http://www.tcl.tk/man/tcl8.5/Keywords/W.htm#widget

The 'text' widget doesn't respond to -size:
http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm

You need to specify the point or pixel size as part of the font:
$tkcanvas itemconfigure text -fill red -font {Helvetica 16}  ;# points
$tkcanvas itemconfigure text -fill red -font {Helvetica -16}  ;# negative is
pixels

You can also create a 'font' to have that setting in one spot:
http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm

Please add anything you find useful to the wiki:
http://puredata.info/docs/guiplugins/GUIPlugins/

.hc

On 01/24/2013 04:06 PM, me.grimm wrote:
> i finally have a chance to play around with the gui-plugin stuff. using
> "tkcanvas itemconfigure" im playing around with changing the look of my
> patches in performance mode. question: is there a list / documentation of
> the gui elements? other than reading over the pd-gui tcl code?
>
> without knowing much i was doing things like:
>
> $tkcanvas itemconfigure text -fill red -font Helvetica -size 16
>
> but -size gives me error
>
> so maybe there is something more other than a trial and error approach or
> use of css knowledge which obviously does not completely translate.
>
>
> m
>
>
>
> _______________________________________________
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



--
____________________
m.e.grimm | m.f.a | ed.m.
megrimm@gmail.com
_________________________________