Re: BWidget NoteBook: Retrieve current page?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: BWidget NoteBook: Retrieve current page?

From: Jos Decoster <decoster@raphael.retarget.com>
Date: Tue May 24 2005 - 13:24:23 CEST

Hi,

You could add a proc like this to your application:

NoteBook::use

proc NoteBook::selected_page { path } {
    variable $path
    upvar 0 $path data
    return $data(select)
}

Example:

set nb [NoteBook .nb]
pack .nb -fill both -expand true

$nb insert end tab_one -text one
$nb insert end tab_two -text two
$nb insert end tab_three -text three
$nb insert end tab_four -text four

# Later on in your application, query selected a page

set pg [$nb selected_page]

Kind regards,

Jos.
Received on Thu Sep 29 14:18:41 2005