🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How can I make the scrollbar work properly ???

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hi all of you guys,

Actually Im trying to make a browser tab with scrollbar (because in my situation, there are many widgets in the browser tab so we dont have enough space for them), however I could not make it work properly...!!!

 

If anybody who know how to do it, please help me to solve the problem.

 

here I attached my code for your convenience

 

your help will be appreciated
Thanks
------------------------------------

# making tab in the browser
proc Make_TAB { } {
    
    lappend auto_path{<path to the folder containing hwt folder>}
    package require hwt; #to import the hwt package
       set tabName 'System_Parameters';
 
     hw browser delete $tabName;
    hw browser add $tabName end [ hw browser get frame $tabName ];
    hw browser select $tabName;

     set frm [ hw browser get frame $tabName ];
    
    set bclose [::hwt::CanvasButton $frm.bclose [::hwt::DluWidth 8] [ ::hwt::DluHeight 8 ] \
        icon  msclose  iconH   1  iconV   1  \
        relief  flat  help  'Exit Program'  takefocus 1 \
        command 'hw browser delete $tabName' ];
    pack $bclose -side top -anchor ne -padx 5 -pady 5 ;


#---- how can I make the scrollbar work properly ??? --------

 set scrb [scrollbar $frm.scrb -command '$frm yview']
 pack $scrb -side right -anchor nw;

#------------------------------------------------------------

    set labelWidth 27;
    set entryWidth 15;

    #section label
    set section1 [label $frm.section1 \
        -text 'SYSTEM PARAMETERS' \
        -justify left \
        -anchor nw \
        -font [hwt::AppFont]];
    pack $section1 -side top -anchor nw;

    hwt::AddPadding $frm -side top -height [hwt::DluHeight 5];

    # frame1
    set frame1 [frame $frm.frame1];
    pack $frame1 -side top -anchor nw;
    
    hwt::AddPadding $frame1 -side left -width [hwt::DluWidth 15];

    set entry11 [ hwt::AddEntry $frame1.entry11 \
        -label 'Mass (kg)' \
        -labelWidth $labelWidth \
        -entryWidth $entryWidth \
        -text '' \
        -textvariable mass_rocket \
        -validate real \
        -state normal \
        -withoutPacking];
    pack $entry11 -side top -anchor nw;
    set entry12 [ hwt::AddEntry $frame1.entry12 \
        -label 'Force (N)' \
        -labelWidth $labelWidth \
        -entryWidth $entryWidth \
        -text '' \
        -textvariable mass_b2 \
        -validate real \
        -state normal \
        -withoutPacking];
    pack $entry12 -side top -anchor nw;

    hwt::AddPadding $frame1 -side bottom -height [hwt::DluWidth 380];

    # buttons Load_Initial_Model, Run
    set btn1 [button $frm.btn1 -width 16 -height 2 -text {Load Initial Model} -command {Open_Model}];
    pack $btn1 -side left -padx 22 -pady 5 -anchor nw;

    set btn2 [button $frm.btn2 -width 16 -height 2 -text {Analysis Setting} -command {Analysis}];
    pack $btn2 -side left -padx 16 -pady 5 -anchor nw;


  }

# end proc Make_TAB

# main code
    set isFirst True;
    Make_TAB;
# end main code
---------------------------

Find more posts tagged with