Forum Topic - Button with differents fonts: (5 Items)
   
Button with differents fonts  
Hi,

i need a button or a clickable label, with different font sizes inside of it. For example a integer value with its unit 
shall be displayed. The unit shall be in a much smaller size as the number.
I can not use 2 labels, because when the number of digits change the spacing doesn't look good.
So my idea was to use a PtMultiText and change it resources so that it behaves like a clickable lable. It worked, but I 
have one problem left. How do I manage it, that the text is not selectable. Because when I click on my modified 
PtMiltiText, it marks the text inside of it.

Somebody can help me with this problem? Or has a other idea to realize a button with different fonts inside of it?

Thanks for your help!

Best regards
Stephen
RE: Button with differents fonts  
Hi Stephen,

I may be mistaken, but believe there should be options in the 'Text Flags' 
(not Multitext Flags!) to disable user selection. 

Cheers,
- Thomas

> -----Original Message-----
> From: Stephen Sheldon [mailto:community-noreply@qnx.com]
> Sent: Mittwoch, 9. März 2011 10:12
> To: photon-graphics
> Subject: Button with differents fonts
> 
> Hi,
> 
> i need a button or a clickable label, with different font sizes inside
> of it. For example a integer value with its unit shall be displayed.
> The unit shall be in a much smaller size as the number.
> I can not use 2 labels, because when the number of digits change the
> spacing doesn't look good.
> So my idea was to use a PtMultiText and change it resources so that it
> behaves like a clickable lable. It worked, but I have one problem left.
> How do I manage it, that the text is not selectable. Because when I
> click on my modified PtMiltiText, it marks the text inside of it.
> 
> Somebody can help me with this problem? Or has a other idea to realize
> a button with different fonts inside of it?
> 
> Thanks for your help!
> 
> Best regards
> Stephen
> 
> 
> 
> _______________________________________________
> 
> Photon microGUI
> http://community.qnx.com/sf/go/post83851
Re: RE: Button with differents fonts  
Hi Thomas,

you are right. Thanks! The Photon Application Builder doesn't show this flag in the Pt_ARG_TEXT_FLAGS ressource. But I 
have manipulated the ressource in the code. And it worked.

Thanks,
Stephen
RE: Button with differents fonts  
what about using subscript or superscript characters for the unit?
Unicode has those.

-----Original Message-----
From: Stephen Sheldon [mailto:community-noreply@qnx.com] 
Sent: March 9, 2011 4:12 AM
To: photon-graphics
Subject: Button with differents fonts

Hi,

i need a button or a clickable label, with different font sizes inside
of it. For example a integer value with its unit shall be displayed. The
unit shall be in a much smaller size as the number.
I can not use 2 labels, because when the number of digits change the
spacing doesn't look good.
So my idea was to use a PtMultiText and change it resources so that it
behaves like a clickable lable. It worked, but I have one problem left.
How do I manage it, that the text is not selectable. Because when I
click on my modified PtMiltiText, it marks the text inside of it.

Somebody can help me with this problem? Or has a other idea to realize a
button with different fonts inside of it?

Thanks for your help!

Best regards
Stephen



_______________________________________________

Photon microGUI
http://community.qnx.com/sf/go/post83851
Re: RE: Button with differents fonts  
But not for all letters. http://www.unicode.org/charts/PDF/U2070.pdf
I need 'cm'. The 'c' letter is missing. :-(