Re: iwidgets::tabnotebook & stuffing
- From: Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Mar 2007 20:57:36 GMT
sasidublin@xxxxxxxxx wrote:
Hi,
I am using iwidgets::tabnotebook. the problem is i cannot able
to put the button on nw corner. it is always center?
my code looks like
iwidgets::tabnotebook .nb -auto 1 -tabpos n -width 400 -height 400
grid .nb -sticky news
set p1 [.nb add -label "Page1"]
button $p1.b -text "button1"
grid $p1.b -sticky nw
this button is placed in center rather than top right corner??
thanks,
Sasi
Even though you specify a -sticky of nw, a lot of other factors are involved in placement of the widget when you use grid, such as the relative weight of the rows and columns and the interactions between rows and columns, even when you only have a single widget in the interior.
In the grid man page, the centering effect you see is mentioned in this sentence:
"For masters whose size is larger than the requested layout, the additional space is apportioned according to the row and column weights. If all of the weights are zero, the layout is centered within its master."
In your case you have the default weight of zero for both the row and column. Hence, the slave is centered within the master.
Try doing "grid rowconfigure $p1 0 -weight 1" and "grid columnconfigure $p1 0 -weight 1" to see the effect it has on your layout.
This has nothing to do with iwidgets, FWIW.
--
Bryan Oakley
http://www.tclscripting.com
.
- Follow-Ups:
- Re: iwidgets::tabnotebook & stuffing
- From: sasi
- Re: iwidgets::tabnotebook & stuffing
- References:
- iwidgets::tabnotebook & stuffing
- From: sasidublin
- iwidgets::tabnotebook & stuffing
- Prev by Date: Re: display images in blt graph?
- Next by Date: Re: Has My Mouse Moved?
- Previous by thread: iwidgets::tabnotebook & stuffing
- Next by thread: Re: iwidgets::tabnotebook & stuffing
- Index(es):