getFormWidth?

Questions, tips and tricks and techniques for scripting in Servoy

getFormWidth?

Postby Harjo » Wed May 12, 2010 12:17 am

Hi there,

I have a tabpanel and that tabpanel has anchors, so it's width can be resized.
Is there somewhere a function, or piece of code, to determ, how wide the form is, in that tabpanel, after a resize??

(tabpanel is not fullscreen, and we also do have/use a navigator.....)

this code:
Code: Select all
application.output(solutionModel.getForm(event.getFormName()).width)


always returns me the design width, not the real width, after resize.
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: getFormWidth?

Postby ROCLASI » Wed May 12, 2010 12:44 am

Hi Harjo,

Yeah, it's not always clear when you get blue-print values or real-time values.
Anyway, I tend to use controller.getFormWidth() to get the current form width of a form, even when using the SolutionModel.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: getFormWidth?

Postby Harjo » Wed May 12, 2010 12:51 am

ah yes, thanks... I was thinking to difficult ;-)
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: getFormWidth?

Postby pbakker » Wed May 12, 2010 9:18 am

Yeah, it's not always clear when you get blue-print values or real-time values


Which bit is not clear exactly?
SolutionModel: All about the blueprint, never the runtime situation
Everything else: Runtime situation

So, actual width of a form in a running client: NOT the solutionModel
Designed (blueprint) width of the form: solutionModel

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 7 guests

cron