When a text-area’s vertical scrollbar property is set to ‘WHEN NEEDED’, Servoy knows when to show the scroll bar when text overflows and hide the scroll bar when ‘excess’ text is deleted. You can see it show or hide as you type or delete.
Is it possible to programmatically know whether the scrollbar (vertical or horizontal) is ON or OFF?
hi,
try this,
var $form = solutionModel.getForm('formName');
var $field = $form.getField('fld_text');
if($field.scrollbars == SM_SCROLLBAR.VERTICAL_SCROLLBAR_NEVER){
$field.scrollbars = SM_SCROLLBAR.VERTICAL_SCROLLBAR_ALWAYS;
} else {
$field.scrollbars = SM_SCROLLBAR.VERTICAL_SCROLLBAR_NEVER;
}
controller.recreateUI();
Regards,
Peter
Peter,
I don’t want to change the scrollbar property at run time but rather programatically determine whether the vertical scrollbar has been made visible (by Servoy) for a field that has a design-time property of WHEN NEEDED. Let’s say that I may then proceed to increase the field size for example.
Is it possible in Servoy?