Recent

Author Topic: Why are TButtons square?  (Read 21967 times)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Why are TButtons square?
« Reply #15 on: February 21, 2011, 10:57:38 pm »
I'm still figuring out Lazarus and pretty sure I will eventually port three applications from REALbasic. I'm slowing migrating one now on OS X, but will need to figure out Windows as well if I am to do all three. Your article is helpful, and I'm trying to build in conditional compiles as I go. Maybe I will need multiple forms as well.

You could probably go the other way as well (Mac form --> Windows form) if you want. The DfmToLfm converter only does 3 things currently to forms (presumably from Windows) if the -m and -s switches are used:
  - Reduces button Height.
  - Sets TabStop = False for controls that can't receive keyboard focus.
  - Substitutes Mac fonts.

Going the other way should be possible too:
  - Set TabStop = True
  - Substitute Windows fonts (Lucida Grande is not a normal Windows font).

That way you could do all design changes on Mac and just auto-convert forms to Windows.

I don't see any alternative to having many IFDEF's in your code. There are too many things that have to be worked around to get a true Mac-like look and feel, so that the app doesn't look ridiculous to Mac users.

Thanks.

-Phil

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Why are TButtons square?
« Reply #16 on: February 26, 2011, 04:02:08 pm »
Thanks for the explanation of DfmToLfm.

I will try to avoid maintaining multiple forms if possible, as I can see myself getting confused. I will try to solve the interface tweaking by planning ahead, and using IFDEFS as needed. Your article has some helpful tips, such as CheckOKCancelBtns.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

 

TinyPortal © 2005-2018