Recent

Author Topic: [SOLVED] TBCLabel with glyph  (Read 1179 times)

SaraT

  • Full Member
  • ***
  • Posts: 139
  • A little student
[SOLVED] TBCLabel with glyph
« on: June 17, 2023, 06:15:45 am »
Hello

I am using a TBCLabel control but I want to paint a glyph (png with layout: top, left, right, bottom). How can I do it, or any idea?

Yes, it has to be a TBCLabel because I want all the properties of this control, but with glyph property.

Thanks a lot.
« Last Edit: June 19, 2023, 05:12:57 am by SaraT »

cdbc

  • Hero Member
  • *****
  • Posts: 2812
    • http://www.cdbc.dk
Re: TBCLabel with glyph
« Reply #1 on: June 17, 2023, 07:21:29 am »
Hi
Does BCLabel have a Canvas, that you're allowed to draw on?
If so, then you might be able to use
Code: Pascal  [Select][+][-]
  1. BCLabel.Canvas.StretchDraw(rect(0,0,50,50),your png-glyph);
  2.  
Maybe @wp could comment on this, as he knows a lot about it  ;)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

wp

  • Hero Member
  • *****
  • Posts: 13554
Re: TBCLabel with glyph
« Reply #2 on: June 17, 2023, 11:27:24 am »
Never used TBCLabel... But why don't you simply add a TImage to the form, to display the png, and place it next to the label?

lainz

  • Hero Member
  • *****
  • Posts: 4743
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: TBCLabel with glyph
« Reply #3 on: June 17, 2023, 04:56:14 pm »
Hello

I am using a TBCLabel control but I want to paint a glyph (png with layout: top, left, right, bottom). How can I do it, or any idea?

Yes, it has to be a TBCLabel because I want all the properties of this control, but with glyph property.

Thanks a lot.

You can create your own TBCLabel with Glyph support.

Check how it's done in TBCButton.

 

TinyPortal © 2005-2018