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 suggestion. I've made some tests and it's
working. Even if there will be a lot of "helper frames", I think I'll
try to use this idea. The buttons are keeping their sizes when the
resolution is changed (because of their "helper frames"). There is a
problem with the font which doesn't resize (somehow the same problem
as when I tried with images on the buttons). I'll try to hack around
this. Maybe a hint? :)
Thank you again, Alex
Sponsored Links







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

Copyright 2008 codecomments.com