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

Problem with Bwidget Titleframe

Status
Not open for further replies.

fabien

Technical User
Sep 25, 2001
299
AU
Hi there!

I am having trouble using Bwiget Titleframe widget, in the example below

<code>
#!bin/sh
#exec wish ${1+"$@"}

package require BWidget
frame .fmtype -borderwidth 2 -relief sunken
pack .fmtype -side top -fill x
set topf [frame .fmtype.topf]
set titf1 [TitleFrame $topf.titf1 -text "Label"]
set titf2 [TitleFrame $topf.titf2 -text "Entry"]
pack $titf1 $titf2 -side left -fill both -padx 4 -expand yes
pack $topf -pady 2 -fill x
label $topf.titf1.label2 -text "toto: "
pack $topf.titf1.label2
label $topf.titf2.label2 -text "tutu: "
pack $topf.titf2.label2

</code>

I would like the labels toto and tutu to be displayed inside the TitleFrames Label and Entry and they display underneath. It's like the fill option does not work in TitleFrame.

Thanks,
 
I found the problem: I need to use getframe to get the correct path

The code that works is now:
#!bin/sh
#exec wish ${1+"$@"}

package require BWidget
frame .fmtype -borderwidth 2 -relief sunken
pack .fmtype -side top -fill x
set titf1 [TitleFrame .fmtype.titf1 -text "Label"]
set titf2 [TitleFrame .fmtype.titf2 -text "Entry"]
pack $titf1 $titf2 -side left -fill both -padx 4 -expand yes
set topf1 [$titf1 getframe]
set topf2 [$titf2 getframe]
label $topf1.label2 -text "toto: "
pack $topf1.label2
label $topf2.label2 -text "tutu: "
pack $topf2.label2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top