Recent

Author Topic: TComboBox - automatically add to the list  (Read 8933 times)

VirtUX

  • New Member
  • *
  • Posts: 10
TComboBox - automatically add to the list
« on: February 28, 2010, 08:53:38 pm »
How to disable the automatic addition of rows in the list by pressing the button Enter?
KUbuntu 12.04.5 (x64) Lazarus SVN: 48878 (Qt4)

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TComboBox - automatically add to the list
« Reply #1 on: February 28, 2010, 09:56:43 pm »
What do you mean exactly? I put a combo box on a form and tried -- nothing I typed in was added to the list.

VirtUX

  • New Member
  • *
  • Posts: 10
Re: TComboBox - automatically add to the list
« Reply #2 on: February 28, 2010, 10:21:58 pm »
Lazarus SVN: 23755
In the box write something. Press Enter. The list (Items) adds a new row with the text of the input field. If you click again Enter, then the changes will not happen. But changing the text in the box and pressing Enter - get a new line in the list (Items).
KUbuntu 12.04.5 (x64) Lazarus SVN: 48878 (Qt4)

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TComboBox - automatically add to the list
« Reply #3 on: February 28, 2010, 10:33:53 pm »
Lazarus SVN: 23755
In the box write something. Press Enter. The list (Items) adds a new row with the text of the input field. If you click again Enter, then the changes will not happen. But changing the text in the box and pressing Enter - get a new line in the list (Items).

I couldn't recreate what you say with svn 23803 (this morning's). Sorry.

VirtUX

  • New Member
  • *
  • Posts: 10
Re: TComboBox - automatically add to the list
« Reply #4 on: February 28, 2010, 10:41:32 pm »
In 23803 it is disabled by default?
« Last Edit: February 28, 2010, 10:56:55 pm by VirtUX »
KUbuntu 12.04.5 (x64) Lazarus SVN: 48878 (Qt4)

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TComboBox - automatically add to the list
« Reply #5 on: March 01, 2010, 05:31:08 am »
I have never seen the behaviour you describe, I'm afraid I didn't understand you completely.
Do you actually mean you do not want to be able to type in at all? Then you should put Style = csDropDownList.
But, if Style is csDropDown (the default), what you type is not added to list anyway.

VirtUX

  • New Member
  • *
  • Posts: 10
Re: TComboBox - automatically add to the list
« Reply #6 on: March 01, 2010, 09:48:40 am »
Yes, in the GTK2 this does not happen. But in QT 4.5 it is.
I would somehow bypass it at the moment KeyDown.
KUbuntu 12.04.5 (x64) Lazarus SVN: 48878 (Qt4)

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TComboBox - automatically add to the list
« Reply #7 on: March 01, 2010, 01:46:15 pm »
Yes, in the GTK2 this does not happen. But in QT 4.5 it is.
I would somehow bypass it at the moment KeyDown.

It's probably a Qt bug then. You should report this in bugtracker.

VirtUX

  • New Member
  • *
  • Posts: 10
Re: TComboBox - automatically add to the list
« Reply #8 on: March 02, 2010, 06:34:25 am »
Yes. That will do.
KUbuntu 12.04.5 (x64) Lazarus SVN: 48878 (Qt4)

 

TinyPortal © 2005-2018