Description: |
if the command associated with -leavecmd returns 0, the page is not left. (BTW, there's a spelling mistake in the docs :)) Thus I can make some checks whether I want to allow the user to move on..
The same should be true for the -raisecmd.. if it returns 0, don't raise the page, but stay where you are instead..
I had a brief look at noteboo.tcl (bwidget 1.8) and simply copied the code used at -leavecmd
% diff notebook.tcl.ori notebook.tcl
697c697,700
< uplevel \#0 $cmd
---
> set code [catch {uplevel \#0 $cmd} res]
> if { $code == 1 || $res == 0 } {
> return -code $code $res
> }
this kinda works.. if the command returns 0 the tab is not raised, however, the tab I was at before now does not appear selected anymore..
Just an idea :)
|