davidw I have taken the x11 specific bits of this, relevant to TIP 172, and packaged them up in the style module, in tklib, along with what was formerly known as gtklook, and is now called 'lobster'. This code is available, along with the "lobster" style, athttp://dedasys.com/freesoftware/files/style.tgz
Anyone have examples on how to use this code?For instance, recently Jeff mentioned this code fragment, added before any Tk widgets are created, allows one to add the ability to increase or decrease the fonts used in widgets by making use of control + / control - / or control - MouseWheel.
package require Tk package require style style::use as style::as::enable control-mousewheel global # now go about creating widgetsThis would work for standard widgets which don't make use of the -font flag.
[jal_frezie] - 2010-11-23 11:19:15Found a little problem -- the mousewheel then scrolls canvas widgets that are not supposed to scroll! Made this little fix to as.tcl to stop that happening, it prevents scrolling if the whole canvas is already visible.
457,458c457,459 < while {[catch {$w $view scroll $delta units}] < && [winfo toplevel $w] ne $w} { --- > while {[catch {if {[$w $view] ne {0.0 1.0}} { > $w $view scroll $delta units}}] > && [winfo toplevel $w] ne $w} {