Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Programatically Control the size and position of a text box.

Hi All,

is it posible to control the size and position of a text box?

I am using some text boxes above a Piviot table to illustate a grouping og Columns. ie Yaer to Date, This Quarter, Full Year. See Below.

The problem is that if the user re sizes the column widths, then the alignment to the columns also needs manually adjusting. Is it possible to programatically change the size and position of a text box based on the width and position  of the columns below?

Many thanks,

Lawrence

Pivot.bmp

2 Replies
jvitantonio
Specialist III
Specialist III

Hi you can start with this. Put this macro in a button

-----

sub a

 

set sh = ActiveDocument

    set obj = sh.GetSheetObject("TX04")

    set fr = obj.GetFrameDef

    pos = fr.Rect

    pos.Top = pos.Top + 60

    pos.Left = pos.Left + 45

    obj.SetFrameDef fr

end sub

-------------

This will get your object text with ID "TX04" and move it 60 docunits from top to button and 45 from left to right.

Anonymous
Not applicable
Author

Hi

     Hope this attached file will be helpful for your requirement.

Regards

Ashok