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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrollbar in Toplevel?

Status
Not open for further replies.

minigiro

Programmer
Nov 6, 2006
1
ES
Is there a way to use scroll in a toplevel? I mean if I do a application in 1024x768 resolution and after I open it in another pc with 640x480, many objects (buttons, ...) can't be accesed and I want to put an scroll to solution this.

Someone (thanks!!!) give me an idea, but I don't know how it works. I intented it with many manuals, but nothing...

He talked me ScrolledWindow from BWidget. If someone knows any example please gime me it (an example with 4 buttons and scrollbar at toplevel). Now I am using vtcl, but I have tkcon too.

Regards
 
you can certainly use Bwidgets, but you can also use a scrolled text widget in the toplevel and then put frames, entries, labels, etc. in the text.

Say you instantiate the toplevel:
toplevel .abc

Now pack in a text widget and a scrollbar and configure the relationship between them:
pack [scrollbar .abc.ys] -side right -fill y
pack [text .abc.t] -side left
.abc.t configure -yscrollc ".abc.ys set"
.abc.ys configure -command ".abc.t yview"


Now you can treat the text widget, .abc.t as a regular frame and put what you want inside it.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top