Re: firefox-like Configuration page widget
- From: Georgios Petasis <petasis@xxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 15:08:12 +0200
O/H Harald Oehlmann έγραψε:
The configuration page of my programs use BWidget Notebook widget so
far.
I want to migrate to tile. Unfortunately, the tile notebook widget
does not present a possibility to scroll the tabs.
I thought I would implement a Config dialog similar to firefox:
- Page selector at the left side with a text and an image per page
- Config page at the right side
Is there any starting code I could use to start in tcl ?
The BWidget set was always magic for me. Is there any pointer of an
explanation how to extend them ?
Thank you in advance,
Harald
An easy approach is through the BWidget PagesManager widget: this widget is a widget that manages overlaping pages (just like notebook widgets do), but allows you to control it by other means (like buttons, radiobuttons, comboboxes, etc.) For example:
package require BWidget
PagesManager .pages
pack .pages -side bottom -fill both -expand 1
for {set i 1} {$i < 6} {incr i} {
.pages add page$i
set frame [.pages getframe page$i]
pack [label $frame.label -text "Page $i" -bg yellow] -fill both -expand 1
pack [button .page$i -text $i -command [list .pages raise page$i]] \
-side left -padx 2 -pady 2
}
..pages raise [.pages page 0]
George
.
- References:
- firefox-like Configuration page widget
- From: Harald Oehlmann
- firefox-like Configuration page widget
- Prev by Date: Re: New to tcl/tk: how to find a word in a string?
- Next by Date: Re: Tcl and the wiimote
- Previous by thread: Re: firefox-like Configuration page widget
- Next by thread: Re: firefox-like Configuration page widget
- Index(es):