elements.xyz.setSize() has no effect

Questions and answers for designing and implementing forms in Servoy

elements.xyz.setSize() has no effect

Postby bevil » Mon Mar 30, 2015 11:53 am

Hi All

I am trying to make a table view height change depending on a number that I choose.

I have a label which is leftmost in the form, and I set it (and check it) using:

Code: Select all
elements.lbl_edit_button.setSize(10,line_items_to_superuser.est_line_height_nr)
application.output(elements.lbl_edit_button.getHeight())


When the code runs, it outputs (correctly) that the height is 23 or 33 or 43 or whatever I have set in line_items_to_superuser.est_line_height_nr, but the actual label field height is not affected.

I don't know what I am missing.
bevil
 
Posts: 163
Joined: Thu Oct 18, 2012 7:31 pm

Re: elements.xyz.setSize() has no effect

Postby Harjo » Mon Mar 30, 2015 1:06 pm

setting the height of the first column of a table-view, does not work on-the-fly.
You need to set it by using solutionModel, and not touch the form before...
Harjo Kompagnie
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: elements.xyz.setSize() has no effect

Postby bevil » Mon Mar 30, 2015 1:12 pm

Thanks Harjo

I don't use solutionmodel. Is it possible to use just this one thing (for now) in solutionmodel and have everything else behave as it currently does?

:)
bevil
 
Posts: 163
Joined: Thu Oct 18, 2012 7:31 pm

Re: elements.xyz.setSize() has no effect

Postby Harjo » Mon Mar 30, 2015 1:23 pm

yes ofcourse.., solutionModel does NOT mean, you have to build everything from scratch.
We use solutionModel almost everytime for such things.
Harjo Kompagnie
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: elements.xyz.setSize() has no effect

Postby bevil » Mon Mar 30, 2015 1:40 pm

Thanks Harjo

:)
bevil
 
Posts: 163
Joined: Thu Oct 18, 2012 7:31 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 7 guests

cron