Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all, I am trying to use the SelectFont BWidget widget, and I am not sure I am using it correctly. I have defined 3-4 named fonts (through font create) which are used in a canvas widget for text items. I also use the SelectFont widget as a toolbar, to configure these fonts. However, as the app may have multiple windows, many SelectFont widgets are visible. All of them can be used to configure the same named fonts, but I haven't find a way to also update the rest SelectFont widgets to get them all in sync. I suppose that for this to happen, we need traces on font changes? I suppose that widgets at the C lever get somehow notified (as configuring a font seems to redraw anythin the font is used), but is a way to get this information at the tcl level? (I suppose I can do this in the widget's callback, where I reconfigure the font myself, but it would be good if this could be automated somehow...) George
Post Follow-up to this messageOn Sat, 9 Oct 2004 17:47:24 +0300, "Georgios Petasis" <petasis@iit.demokritos.gr> wrote: >Hi all, > >I am trying to use the SelectFont BWidget widget, and I am not sure I am >using it correctly. > >I have defined 3-4 named fonts (through font create) which are used >in a canvas widget for text items. I also use the SelectFont widget as >a toolbar, to configure these fonts. However, as the app may have multiple >windows, many SelectFont widgets are visible. All of them can be used >to configure the same named fonts, but I haven't find a way to also update >the rest SelectFont widgets to get them all in sync. How about having just one SelectFont widget, and each visible toolbar button invokes this sole instance? Helmut Giese
Post Follow-up to this messageGeorgios Petasis wrote: > I suppose that for this to happen, we need traces on font changes? Yes, this is a hole in the font level code. I would recommend adding a -command callback to 'font create' for 8.5. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.