Re: Re: Getting the height and width of controls?
- To: mathgroup at smc.vnet.net
- Subject: [mg98935] Re: [mg98905] Re: Getting the height and width of controls?
- From: John Fultz <jfultz at wolfram.com>
- Date: Wed, 22 Apr 2009 05:11:26 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
AbsoluteCurrentValue should (but as you point out, doesn't) work. In lieu of that, you can use Rasterize. In[1]:= Rasterize[Button["Click Here", Print[10!]], "RasterSize"] Out[1]= {64, 27} Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc. On Tue, 21 Apr 2009 05:10:46 -0400 (EDT), meitnik wrote: > ok, so far this is what I stumbled upon, but it dones't work right: > > t = Button["Click Here", Print[10!]] > AbsoluteCurrentValue[bt, ImageSize] > > That code always gives {350,350}. Lots of other options work, but not > getting the height/width of a control. > I can't use CurrentValue for that works only when I actually click the > button, but it too gives only the same answer. > I didnt think getting the simple height/width of a control to be that > hard?? If there is a better way, please teach me. Thanks > > Andrew