Recent

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

MarkMLl

  • Hero Member
  • *****
  • Posts: 1727
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
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

zeljko

  • Hero Member
  • *****
  • Posts: 1152
    • 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: 7923
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
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

MarkMLl

  • Hero Member
  • *****
  • Posts: 1727
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



Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

 

TinyPortal © 2005-2018