Recent

Author Topic: Wanted: More flexible TEdit component  (Read 2786 times)

wittbo

  • Full Member
  • ***
  • Posts: 150
Wanted: More flexible TEdit component
« on: January 31, 2019, 01:24:31 pm »
I'm just searching for TEdit component, which fully works with macos (cocoa) and is able to handle the component.height Parameter and the component.font.size Parameter. I need a form with much more larger Input fields, maybe about 30 -35.

I saw many components, which are working with Windows or sometimes with Linux, but Mac?
Has anyone an idea?
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Wanted: More flexible TEdit component
« Reply #1 on: January 31, 2019, 08:45:10 pm »
You need higher edit box than edit for text itself?
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

wittbo

  • Full Member
  • ***
  • Posts: 150
Re: Wanted: More flexible TEdit component
« Reply #2 on: January 31, 2019, 09:03:30 pm »
Yes, I would like an Edit box with Height = 35 and Fontsize = 16.
Whenever I try to change those parameters for the standard TEdit, changes are not accepted. There is only one standard size and nothing more.
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Wanted: More flexible TEdit component
« Reply #3 on: January 31, 2019, 09:23:29 pm »
I think this can be done only with custom "border" painting. Under Carbon only with TMemo.BorderStyle := bsNone and custom drawn border and focus.
Under Cocoa there you can use TEdit with BorderStyle := bsNone, but now it's imposible to get nice result due this bug: https://bugs.freepascal.org/view.php?id=34828 . In bug report you can see my custom control with custom "paddings"

Code: Pascal  [Select][+][-]
  1. TMyEdit = class(TGraphicControl)
  2. private
  3.   FEdit: TEdit;
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

wittbo

  • Full Member
  • ***
  • Posts: 150
Re: Wanted: More flexible TEdit component
« Reply #4 on: January 31, 2019, 09:36:33 pm »
Thank you, PS, for your answer.

Just a few minutes ago i found, that the problem does not basically exist on the Mac, but that it is a problem with the visual editor in the lazarus IDE on the mac. So the editor doesn't show changed TEdit properties, but the finished application shows everything correctly in its runtime environment. So it's a bit harder to create a visual design. I found some other things where the visual editor doesn't display correctly, where the program runs and displays correctly. I will collect them and submit them as bug reports.
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

garlar27

  • Hero Member
  • *****
  • Posts: 652
Re: Wanted: More flexible TEdit component
« Reply #5 on: January 31, 2019, 11:44:11 pm »
Try using the control's Anchor property. It is really usefull.

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Wanted: More flexible TEdit component
« Reply #6 on: February 01, 2019, 06:37:31 am »
So the editor doesn't show changed TEdit properties, but the finished application shows everything correctly in its runtime environment.
This can be due Lazarus is build with Carbon interface and you are using Cocoa in your app.
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

 

TinyPortal © 2005-2018