For Programmers: Free Programming Magazines  


Home > Archive > Tcl > January 2008 > Re: Button doesn't have to resize when the screen resolution is









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Button doesn't have to resize when the screen resolution is
alexg

2008-01-29, 4:56 am

On Jan 25, 11:47 pm, Schelte Bron <nos...@wanadoo.nl> wrote:
> alexg wrote:
>
> If I understand correctly you have a problem, and a work-around for
> the problem which also has a problem. It's kind of funny to me how
> the whole thread sofar focuses on solving the problem with the
> work-around instead of finding a solution for the initial problem.
>
> What you can do is use the sizing properties of a frame to control
> the size of the text button by placing the button in a frame:
>
> # Create a helper frame with the desired size
> frame .b_frame -width 4c -height 1c
> # Create the button after the frame so it won't be obscured
> button .b -text Quit -command exit
> # Make the button the size of the helper frame
> place .b -in .b_frame -relwidth 1 -relheight 1
> # Put the button in the GUI (can also use grid)
> pack .b_frame
>
> Schelte.
> --
> set Reply-To [string map {nospam schelte} $header(From)]


Hi Schelte
Thanks a lot for your tip! I've made some tests and it seems it's
working. Even if there will be a lot of "helper frames", I'll try to
use this solution.
The buttons are trying to keep their sizes now(through their helper
frames) when the resolution is changed, but the font don't want to
resize. I'll see what I can do about this, maybe a hack around fonts.
Do you have any hint for this too? :)
Thanks again,
Alex
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com