Recent

Author Topic: [SOLVED] TCheckbox bug  (Read 1541 times)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2435
    • havefunsoft.com
Re: [SOLVED] TCheckbox bug
« Reply #15 on: January 15, 2020, 11:40:37 pm »
Just for the record, but not the reference.

Delphi FMX checkbox doesn't seem to support "mixed" state at all. (so there's no "State" property, only "IsChecked")

Changing IsChecked via code triggers OnChange event, but doesn't trigger OnClick event.
Changing checked via mouse click triggers both OnChange and OnClick events.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

VTwin

  • Hero Member
  • *****
  • Posts: 894
  • Former Turbo Pascal 3 user
Re: [SOLVED] TCheckbox bug
« Reply #16 on: January 16, 2020, 01:14:43 am »
Wow, thanks. That is confusing, I'm having a drink now myself. ;)

I've explored options for cross-platform development, and Lazarus is the best that I have found, especially as a one person team trying to do everything myself. As an end user, I'm just trying to understand what the expected behavior is, and report bugs as I can.

It does seem that the expected control behavior for controls should be well defined by now. Maybe Delphi's choices are not always the best for Lazarus. In my mind, if Lazarus had alternate options for setting controls that always follow JS/Cocoa convention, and the Delphi compatible options followed Delphi/Windows that would be a good thing.

Just my 2 cents. That and about $3 will get you a cup of Starbucks coffee in my country.

Cheers,
VTwin
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.6 (64 bit Cocoa, also fixes and trunk)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)

VTwin

  • Hero Member
  • *****
  • Posts: 894
  • Former Turbo Pascal 3 user
Re: [SOLVED] TCheckbox bug
« Reply #17 on: January 16, 2020, 01:20:05 am »
Just for the record, but not the reference.

Delphi FMX checkbox doesn't seem to support "mixed" state at all. (so there's no "State" property, only "IsChecked")

Changing IsChecked via code triggers OnChange event, but doesn't trigger OnClick event.
Changing checked via mouse click triggers both OnChange and OnClick events.

I suppose that is a good example where sticking strictly with Delphi is not the best option. Windows, Linux, and macOS support mixed state checkboxes. I'd say Delphi -> Lazarus compatibility is more important than Lazarus -> Delphi, but just my opinion.
« Last Edit: January 16, 2020, 01:29:55 am by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.6 (64 bit Cocoa, also fixes and trunk)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)

 

TinyPortal © 2005-2018