Recent

Author Topic: Borders for text painting components  (Read 3268 times)

wittbo

  • Full Member
  • ***
  • Posts: 150
Borders for text painting components
« on: September 29, 2016, 12:51:48 am »
Hallo,
I'm new with Lazarus, but well known with Delphi. My development platform is now a Mac with OS X Yosemite. It seems to be quite simple just like Delphi, but when I try to make some kind of well looking user interface, it seems to me a mess. None of the standard elements like static text, panel is able to draw a simple borderline around itself. The different border types of the TBevel don't work. You can only choose a boxed shape but it doesn't look very gracile. BTW, TPanel.color := clWhite does not paint white but acts like clNone.

What can I do, if I simply want a static text field or panel with a border around it? Remember, Lazarus on a Mac not Windows.
Thanks for some hints.

wittbo.

-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Borders for text painting components
« Reply #1 on: September 29, 2016, 02:52:57 am »
There is a price to pay with any cross-platform UI widgetset, particularly one like LCL which is modeled closely after the Windows-only VCL.

The things you notice not working likely were not possible to simulate using the Mac's Carbon framework. If you scroll over to the Restricted tab (should probably be called Restrictions), you can see what doesn't work for the selected control, although I don't know whether these are always up-to-date. I see those things you note listed for TPanel, though.

Good news is that there's a Cocoa widgetset. It's still incomplete, but it may meet your needs and it does appear to draw the TPanel outline (although still not quite right, by my eye).

Be sure to post bug reports for the Cocoa widgetset as you encounter them or incomplete features. That's the only way they'll get fixed.

Also, if you're entirely new to Lazarus on Mac, you may find this article helpful:

https://dl.dropboxusercontent.com/u/28343282/MacXPlatform/LazXProj.html

lainz

  • Hero Member
  • *****
  • Posts: 4470
    • https://lainz.github.io/
Re: Borders for text painting components
« Reply #2 on: September 29, 2016, 03:15:37 am »
You can use BGRA Controls.

We have custom text and panel Controls as you need.

 

TinyPortal © 2005-2018