Page 1 of 1
Ruby setViewSize
Posted: Fri Oct 31, 2014 11:23 pm
by tulamide
The user guide describes this method to resize a view within its parent. However, trying to use it raises a 'no method' error, and indeed the methods-call doen't list setViewSize, just getViewSize.
Any information on this? Especially how to set the view size without this method?
Re: Ruby setViewSize
Posted: Fri Oct 31, 2014 11:33 pm
by KG_is_back
I believe it is the FS 3.0.5 feature. There is no other way of setting view size as far as I'm concerned. You may cheat a little and use clipping and area redraws to simulate the behavior to some extend.
Re: Ruby setViewSize
Posted: Fri Oct 31, 2014 11:38 pm
by tulamide
Ah, I see! Thanks. I wanted to add this as a feature to a control, but size set by the user when building the view is also sufficient.
Re: Ruby setViewSize
Posted: Sat Nov 01, 2014 12:18 am
by KG_is_back
I wonder why there isn't this feature in the FS primitives in the first place(on the Module GUI prim to be specific).
Re: Ruby setViewSize
Posted: Sat Nov 01, 2014 12:25 am
by tulamide
KG_is_back wrote:I wonder why there isn't this feature in the FS primitives in the first place(on the Module GUI prim to be specific).
Me too. It was one of the first things I wondered about when starting doing graphics. Would make life much easier

Re: Ruby setViewSize
Posted: Sat Nov 01, 2014 12:29 am
by KG_is_back
tulamide wrote:KG_is_back wrote:I wonder why there isn't this feature in the FS primitives in the first place(on the Module GUI prim to be specific).
Me too. It was one of the first things I wondered about when starting doing graphics. Would make life much easier

It definitely would. Perhaps they didn't added it straightaway because there were some issues with recalculation of front panel (I can imagine this to happen when the frontpanel size suddenly changes, trowing redraws and viewArea triggers all over the place). But since they added it in ruby, the normal green version shouldn't be so much of an effort to add.