Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to scroll a frame?

Status
Not open for further replies.

anirban2k2001

Programmer
Aug 25, 2003
27
0
0
IN
Hi all,

I have a frame in TCL where there are many label, text and entry widgets. To accomodate all the controls in the frame, I want to make the frame scrolling (both vertical and horizontal). How do I do it?

The frame initialisation code is given below:

frame .f2 -width 250 -height 270
pack .f2
pack propagate .f2 0

Any early help wii be of immense help.
Thanking in advance.

Regards,
Anirban Sarkar
 
You can't scroll a frame in Tk.
BWidgets (that comes with the installation) has a scrollable frame:
NAME
ScrollableFrame - Scrollable frame containing widget
CREATION
ScrollableFrame pathName ?option value...?
STANDARD OPTIONS
-background or -bg -xscrollcommand
-yscrollcommand

WIDGET-SPECIFIC OPTIONS
-areaheight
-areawidth
-constrainedheight
-constrainedwidth
-height
-width
-xscrollincrement
-yscrollincrement

WIDGET COMMAND
pathName cget option
pathName configure ?option? ?value option value ...?
pathName getframe
pathName see widget ?vert? ?horz?
pathName xview ?arg...?
pathName yview ?arg...?

Bob Rashkin
rrashkin@csc.com
 
Thanks.
However, I am totally confused.
My application will ultimately run on a simputer and unfortunately, the simputer does not support Bwidget. It gives the message "Can't find package Bwidget".

What do I do?

Regards,
Anirban Sarkar
 
well, then you can't scroll a frame. Consider using a text widget with scrollbars and put the other widgets in it. Look at the Tk demos (that come with the ActiveState installation), especially the "text widget with embedded windows".

Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top