Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: How to change the position of TextItem at runtime programmatically  (Read 152 times)

thefinalcutbg

  • Newbie
  • *
  • Posts: 2
    • View Profile
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.

Subst

  • Sr. Member
  • ****
  • Posts: 381
    • View Profile
Re: How to change the position of TextItem at runtime programmatically
« Reply #1 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
« Last Edit: August 03, 2021, 09:35:34 AM by Subst »

thefinalcutbg

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to change the position of TextItem at runtime programmatically
« Reply #2 on: August 03, 2021, 06:05:24 PM »
Perfect! Thank you, very much! :)