Recent

Author Topic: TComboBox in Trunk with GTK2  (Read 793 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
TComboBox in Trunk with GTK2
« on: April 18, 2020, 03:12:07 pm »
I'm starting off a new project on Linux (Debian x86_64) and the first thing I put on the form was a TComboBox where the list gets populated with a list of serial ports.

Using trunk updated a few minutes ago and compiling for GTK2, clicking on a list item doesn't copy it to the text field.

Compiling for Qt it works as expected.

Also on GTK2 I'm having problems setting the TComboBox's ReadOnly property, the Object Inspector will toggle Enabled and Visible but not ReadOnly.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: TComboBox in Trunk with GTK2
« Reply #1 on: April 18, 2020, 04:40:17 pm »
I'm starting off a new project on Linux (Debian x86_64) and the first thing I put on the form was a TComboBox where the list gets populated with a list of serial ports.

Using trunk updated a few minutes ago and compiling for GTK2, clicking on a list item doesn't copy it to the text field.

Compiling for Qt it works as expected.

Also on GTK2 I'm having problems setting the TComboBox's ReadOnly property, the Object Inspector will toggle Enabled and Visible but not ReadOnly.

MarkMLl

That looks like regression to me. Please open an issue about it and attach example project.

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: TComboBox in Trunk with GTK2
« Reply #2 on: April 18, 2020, 04:46:44 pm »
I checked first with an older trunk on Mint/gtk2 and then with the current revsion, but found the combobox to work correctly.

Please describe exactly what you are doing. I did this: Added a TCombobox, entered some dummy strings in the Items property, compiled and ran the progrm. Dropped down the list, clicked on an item in the list and the item appeared in the control after the dropdown had closed.

As for the ReadOnly property: This property will be removed for Delphi compatibility and consistent behavior across widgetsets (https://wiki.freepascal.org/Lazarus_2.0.0_release_notes#TCustomComboBox.ReadOnly_was_deprecated). When you switch the Combobox.Style to
csDropdown it is no longer possible to type text into the field directly.  When you understand "ReadOnly" as the inability to select another item from the dropdown you must write some code

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: TComboBox in Trunk with GTK2
« Reply #3 on: April 18, 2020, 06:00:48 pm »
I'm starting off a new project on Linux (Debian x86_64) and the first thing I put on the form was a TComboBox where the list gets populated with a list of serial ports.

Using trunk updated a few minutes ago and compiling for GTK2, clicking on a list item doesn't copy it to the text field.

Compiling for Qt it works as expected.

Also on GTK2 I'm having problems setting the TComboBox's ReadOnly property, the Object Inspector will toggle Enabled and Visible but not ReadOnly.

MarkMLl

That looks like regression to me. Please open an issue about it and attach example project.

https://bugs.freepascal.org/view.php?id=36932

After an item is selected from the dropdown the always-visible portion of the TComboBox remains blank until it is clicked on, at which point the selected item appears.

Affects GTK2, but not Qt.

MarkMLl



MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018