How to change form header height from a method?

Questions, tips and tricks and techniques for scripting in Servoy

How to change form header height from a method?

Postby Westy » Sat Apr 21, 2018 3:49 pm

How can a form's header height be changed from a method?

Dean Westover
Choices Software, Inc.
Servoy Webclient Version: 6.0.7
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: How to change form header height from a method?

Postby ROCLASI » Tue Apr 24, 2018 7:33 am

Hi Dean,

There is no runtime property to set the height of a form part. You need to use the solutionModel like so:

Code: Select all
var _sForm = "myForm",
   _oForm = solutionModel.getForm(_sForm);

// set the height
_oForm.getPart(JSPart.HEADER).height = 100;

// Making sure we don't get the 'stale forms' error
forms[_sForm].controller.recreateUI();


Hope this helps.
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: How to change form header height from a method?

Postby Westy » Tue Apr 24, 2018 11:21 pm

Hi Rob,

Thank you.
Works great!

Dean
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA


Return to Methods

Who is online

Users browsing this forum: No registered users and 3 guests