The default settings for the gnocl::button are for the icon to be on the left and the label on the right. Not all buttons need to be like this. Consider the toolbar button where the icon in above the label. These new options offer the programmer a little more flexibility when building a UI using Gnocl, especially when creating ribbon type containers.
This is how the new settings look:
And the sample code:
set hbox [gnocl::hBox]
set but1 [gnocl::button -text vertical -icon %#Info -data DATA -orientation vertical ]
set but2 [gnocl::button -text vertical-invert -icon %#Info -data DATA -orientation vertical -invert 1]
set but3 [gnocl::button -text horizontal -icon %#Info -data DATA ]
set but4 [gnocl::button -text horizontal-invert -icon %#Info -data DATA -invert 1]
puts "but1 orientation = [$but1 cget -orientation]"
puts "but3 orientation = [$but3 cget -orientation]"
puts "but1 invert = [$but1 cget -invert]"
puts "but2 invert = [$but2 cget -invert]"
$hbox add $but1 -fill 1 -expand 1
$hbox add $but2 -fill 1 -expand 1
$hbox add $but3 -fill 1 -expand 1
$hbox add $but4 -fill 1 -expand 1
gnocl::window -child $hbox -title "Button -invert and -orientation"
Subscribe to:
Post Comments (Atom)
-
Given this module some attention today. Added some of the more package wide options to the module and created customised handler for settin...
-
Over the past few programming sessions I've been working on producing a central point, a dashboard, around which it's possible to se...
-
The contents of a GtkTextBuffer can be saved as serialized binary file. Whilst converting such a file to ascii may be problematic if the bu...

No comments:
Post a Comment