Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

active object - change the font

hi

i wish to change the font for a button object when it is qliked

can i include some code in the expression which will check the "active" state of the object and take approp action ?

anything in "mind" ?

1 Solution

Accepted Solutions
Not applicable
Author

hi,

If you don't want to change the existed text of a button then comment the below line in the macro of my earlier post.

prop.Text.v = "Change_Font"

It will works for all the objects for that you need to provide those objectID's in the macro.

Regards

..........


View solution in original post

5 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Do you want to change the font on the button? And I'm assuming that you wanted to change the font style? Is this right, or do you want to change text on the button where user "Clicks"?

Thanks,

DV

Not applicable
Author

hi,

Use the below macro in a button action.

Hope it helps you.

Sub TestFont

set button = ActiveDocument.GetSheetObject("BU04")

set prop = button.GetProperties

set fnt=button.GetFrameDef.Font

prop.Text.v = "Change_Font"

fnt.PointSize1000 = fnt.PointSize1000 + 2000

'prop.TextColor.PrimaryCol.Col = RGB(255,0,0)   

button.SetProperties prop

button.SetFont fnt

End Sub

Regards

..........

Not applicable
Author

hi,

If you don't want to change the existed text of a button then comment the below line in the macro of my earlier post.

prop.Text.v = "Change_Font"

It will works for all the objects for that you need to provide those objectID's in the macro.

Regards

..........


Not applicable
Author

thanks Rav and regrads, clive

Not applicable
Author

Hi,

Please mark the correct answer if it works.So that others can able to get the solution.

Regards

...........