Ruby setViewSize

For general discussion related FlowStone
Post Reply
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Ruby setViewSize

Post 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?
"There lies the dog buried" (German saying translated literally)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Ruby setViewSize

Post 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.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Ruby setViewSize

Post 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.
"There lies the dog buried" (German saying translated literally)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Ruby setViewSize

Post 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).
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Ruby setViewSize

Post 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 :D
"There lies the dog buried" (German saying translated literally)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Ruby setViewSize

Post 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 :D

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.
Post Reply