LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: thefinalcutbg on August 01, 2021, 05:41:39 PM

Title: How to change the position of TextItem at runtime programmatically
Post by: thefinalcutbg on August 01, 2021, 05:41:39 PM
I've started using the library yesterday and this is the first time I'm using a report library. I have to fill a simple printable form based on some data which includes putting 'x' in one of the several checkboxes. I can access the variables from my code, but not the items. I know I can create several different variables, corresponding to TextItems and change the value of one of them to "x" at runtime, but it that doesn't sound like the right way to do it.
Title: Re: How to change the position of TextItem at runtime programmatically
Post by: Subst on August 03, 2021, 09:32:38 AM
Hi!

By script in content of TextItem

like this

$S{
 THIS.geometry.x=10;
 THIS.geometry.y=150;
 'klop';
 }

if you need to use variable instead const as x coordinate
replace '10' with $V{your_variable} for example
Title: Re: How to change the position of TextItem at runtime programmatically
Post by: thefinalcutbg on August 03, 2021, 06:05:24 PM
Perfect! Thank you, very much! :)