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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator III
Creator III

button text change while select the button

i have two button

button sales and target

if i select the sales button, the button text size(Label) want to increase??

thanks in advance

9 Replies
sunny_talwar

I don't think font can be conditional, may be have two buttons one with bigger font which becomes active once you select the button. Its a work around, but it may work.

stephenedberkg
Creator III
Creator III
Author

sunindia

thank you for your response

sunny_talwar

No problem

As long as I am able to help.

Best,

Sunny

gautik92
Specialist III
Specialist III

You can keep two buttons first one with less font size link it with second button with big font size

Anonymous
Not applicable

you may define a macro using api

like

'FontSize
set vFontSize = ActiveDocument.Fields("Fontsize").GetPossibleValues
if not isnull(vFontSize) then 
'msgbox(vFontSize.Item(0).Text) 
if vFontSize.Item(0).Text > 8000 then 'minimum fontsize = 8
vframefont.PointSize1000=vFontSize.Item(0).Text
end if
end if 

stephenedberkg
Creator III
Creator III
Author

HRLinder

i don't know about macro

Anonymous
Not applicable

then I would not start with it.

it is not easy to work with them.

if you are more familiar with QlikView you may start

with macros. there is a API.qvw available. you may start with

simple things.

sunny_talwar

Attaching a sample with two buttons on top of each other:

Capture.PNG

Not applicable

Here are two macros - one to increase the size, one to decrease the size by 2 points each time they are executed. Simply call Font_Size_Up or Font_Size_Down in the Actions (Run Macro) under the button. You could easily set a static number rather than +- 2000 if you want one specific size. I know you don't desire to use macros, but this may help some one in the future who reads this post.

Sub Font_Size_Up
     set obj = ActiveDocument.GetSheetObject("BU02") 
     fnt = obj.GetFrameDef.Font
     fnt.PointSize1000 = fnt.PointSize1000 + 2000 'Sets font size up 2 points
     obj.SetFont fnt
     'Cleanup
     set obj = nothing
End sub



Sub Font_Size_Down
     set obj = ActiveDocument.GetSheetObject("BU02") 
     fnt = obj.GetFrameDef.Font
     fnt.PointSize1000 = fnt.PointSize1000 - 2000 'Sets font size down 2 points
     obj.SetFont fnt
     'Cleanup
     set obj = nothing
End sub