From: Isaías Prestes on
Hello,

How can I put a Scrollable Frame inside a notebook page? Here my
Scrollable Frame

-----8<-----
package require BWidget

set sw [ScrolledWindow .sw -relief sunken -borderwidth 2]
set sff [ScrollableFrame .sw.f]
$sw setwidget $sff

set sf [$sff getframe]

pack $sw -fill both -expand yes

for {set n 0} {$n < 20} {incr n} {
set lid [label $sf.name$n -text "Name $n"]
set eid [entry $sf.editname$n -textvariable name$n]

pack $lid $eid
}

package require style::as
[style::as::enable mousewheel global]
-----8<-----

Thank you,

Isaías V. Prestes

From: Gerald W. Lester on
Which notebook widget are you using as their interfaces are not identical.

Isaías Prestes wrote:
> Hello,
>
> How can I put a Scrollable Frame inside a notebook page? Here my
> Scrollable Frame
>
> -----8<-----
> package require BWidget
>
> set sw [ScrolledWindow .sw -relief sunken -borderwidth 2]
> set sff [ScrollableFrame .sw.f]
> $sw setwidget $sff
>
> set sf [$sff getframe]
>
> pack $sw -fill both -expand yes
>
> for {set n 0} {$n < 20} {incr n} {
> set lid [label $sf.name$n -text "Name $n"]
> set eid [entry $sf.editname$n -textvariable name$n]
>
> pack $lid $eid
> }
>
> package require style::as
> [style::as::enable mousewheel global]
> -----8<-----
>
> Thank you,
>
> Isaías V. Prestes
>


--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
From: Isaías Prestes on
On Sep 25, 2:47 pm, "Gerald W. Lester" <Gerald.Les...(a)cox.net> wrote:
> Which notebook widget are you using as their interfaces are not identical..
>
>
>
> Isaías Prestes wrote:
> > Hello,
>
> > How can I put a Scrollable Frame inside a notebook page?  Here my
> > Scrollable Frame
>
> > -----8<-----
> > package require BWidget
>
> >     set sw  [ScrolledWindow .sw -relief sunken -borderwidth 2]
> >     set sff [ScrollableFrame .sw.f]
> >     $sw setwidget $sff
>
> >     set sf  [$sff getframe]
>
> >     pack $sw -fill both -expand yes
>
> >     for {set n 0} {$n < 20} {incr n} {
> >         set lid [label  $sf.name$n -text "Name $n"]
> >         set eid [entry $sf.editname$n -textvariable name$n]
>
> >         pack $lid $eid
> >     }
>
> >     package require style::as
> >     [style::as::enable mousewheel global]
> > -----8<-----
>
> > Thank you,
>
> > Isaías V. Prestes
>
> --
> +------------------------------------------------------------------------+
> | Gerald W. Lester                                                       |
> |"The man who fights for his ideals is the man who is alive." - Cervantes|
> +------------------------------------------------------------------------+

Hi, Lester,

I´m using default notebook (Tk::NoteBook)

-----8<-----
NoteBook $top.orelhas \
-font [vTcl:font:getFontFromDescr "-family Arial -size 11 -
weight bold -slant roman -underline 0 -overstrike 0"] \
-height 200 -width 300
$top.orelhas insert end page1 \
-text Pagina1 -raisecmd { set paginaativa 1 }
.....

-----8<-----

It´s not possible? Where can i find a example?

Best regards,

Isaías V. Prestes
From: Emiliano on
On 25 sep, 11:48, Isaías Prestes <isaias.pres...(a)gmail.com> wrote:
> Hello,
>
> How can I put a Scrollable Frame inside a notebook page?  Here my
> Scrollable Frame

Let code speak:

8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----

package require BWidget

set nb [NoteBook .nb -height 200 -width 300]
$nb insert end page1 -text Pagina1
pack $nb -expand 1 -fill both

# get the frame for the "page1" notebook page; this is the
# frame you should put your widgets into
set f [$nb getframe page1]
# create a automatically scrolled window
set sw [ScrolledWindow $f.sw]
pack $sw -expand 1 -fill both

# create a scrollable frame
set sf [ScrollableFrame $sw.sf]
# insert the scrollableframe inside the scrolled window
$sw setwidget $sf

# insert some widgets
set f [$sf getframe]
for {set i 0} {$i <= 50} {incr i} {
set l [label $f.lable${i} -text "Label $i"]
set e [entry $f.entry${i}]
grid $l $e
}

# don't forget to raise the notebook tab
$nb raise page1

8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----

Emiliano
From: Gerald W. Lester on
Isaías Prestes wrote:
> On Sep 25, 2:47 pm, "Gerald W. Lester" <Gerald.Les...(a)cox.net> wrote:
>> Which notebook widget are you using as their interfaces are not identical.
>>
>>
>>
>> Isaías Prestes wrote:
>>> Hello,
>>> How can I put a Scrollable Frame inside a notebook page? Here my
>>> Scrollable Frame
>>>...
>
> I´m using default notebook (Tk::NoteBook)

There is no Tk::NoteBook. There is a ttk::notebook (in 8.5 and later) and a
Bwidget NoteBook.


> -----8<-----
> NoteBook $top.orelhas \
> -font [vTcl:font:getFontFromDescr "-family Arial -size 11 -
> weight bold -slant roman -underline 0 -overstrike 0"] \
> -height 200 -width 300
> $top.orelhas insert end page1 \
> -text Pagina1 -raisecmd { set paginaativa 1 }
> ....
>
> -----8<-----
>
> It´s not possible? Where can i find a example?

Ok, the signature for the insert method matches that of the Bwidget NoteBook
(I personally rather like using the ttk notebook, but will stick with what
you are using).

set nb $top.orelhas
# get the frame for the "page1" notebook page; this is the
# frame you should put your widgets into
set nf [$nb getframe page1]

# create a scrollable frame
set sf [ScrollableFrame $nf.sf]

pack $nf -expand 1 -fill both

# insert some widgets
set f [$sf getframe]
for {set i 0} {$i <= 50} {incr i} {
set l [label $f.lable${i} -text "Label $i"]
set e [entry $f.entry${i}]
grid $l $e
}

# don't forget to raise the notebook tab
$nb raise page1

--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+