Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-04

TComboBox.DropDownCount has no effect.

5 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Donald Ziesig

Hi All!

I have several apps that use combo boxes for (e.g.) Minutes. For Minutes, the items range from 0 to 59. The Object Inspector shows that the DropDownCount is 8, but no matter what I put in there, I get the entirety of the items. For Minutes, the selection box spans the display from the top to the bottom, with the top part being blank and the bottom (from the position of the control itself) with 0, 1, ... until it hits the bottom of the screen.

To test this, create an application, put a TComboBox on the form, populate the Items with a set of items having more than 8 entries. Run the app and look at the number of items in the drop-down list. Change the DropDownCount to something like 3 and try again. It always shows every item in the list no matter what is put in the Object Inspector. Additionally, in the FormCreate event, try setting ComboBox1.DropDownCount to something less than the number of Items. The new value is totally ignored.

I am using Lazarus 1.4RC2 with no modifications on Linux Mint 17.

Am I doing something wrong?

Thanks,

Don Ziesig

Reply by email

Howard Page-Clark
to Donald Ziesig: Hi All! I have several apps that use combo boxes for (e.g.) Minutes. For Minutes, the…
Donald Ziesig wrote 6 lines
Hi All! I have several apps that use combo boxes for (e.g.) Minutes. For Minutes, the items range from 0 to 59. The Object Inspector shows that the DropDownCount is 8, but no matter what I put in there, I get the entirety of the items.

This seems to be a Linux bug, since DropDownCount restricts the entries listed correctly on Windows (win32).

Howard

---
This email has been checked for viruses by Avast antivirus software. http://www.avast.com

Reply by email

Michael Thompson
to Donald Ziesig: Hi All! I have several apps that use combo boxes for (e.g.) Minutes. For Minutes, the…
Donald Ziesig wrote 6 lines
Additionally, in the FormCreate event, try setting ComboBox1.DropDownCount to something less than the number of Items. The new value is totally ignored. I am using Lazarus 1.4RC2 with no modifications on Linux Mint 17.

You haven't stated widgetset, but I'm guessing GTK2

If so, good news: you're doing nothing wrong.

Bad news:
http://wiki.freepascal.org/Lazarus_known_issues_(things_that_will_never_be_fixed)

My memory (not what it was...) also says that in the Object Inspector there is a note to this affect when you click on DropDownCount. Oh, I've just double checked. UI has changed since I last looked, but select select TComboBox, then switch to the "Restricted" tab of the Object Inspector. You'll see various OS icons on the different properties. They are the widgetsets that property doesn't work on.

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150405/47e2f947/attachment.html>

Reply by email

Unknown author
to Howard Page-Clark: This seems to be a Linux bug, since DropDownCount restricts the entries listed correctly…
Howard Page-Clark wrote 11 lines
On 04/04/2015 19:04, Donald Ziesig wrote: > Hi All! > > I have several apps that use combo boxes for (e.g.) Minutes. For > Minutes, the items range from 0 to 59. The Object Inspector shows > that > the DropDownCount is 8, but no matter what I put in there, I get the > entirety of the items. This seems to be a Linux bug, since DropDownCount restricts the entries listed correctly on Windows (win32).

No, it's not bug but gtk behaviour. Gtk have popup (like popupmenu) for combolist by default.
That can be changed by setting in gtk2rc file (don't know now what exactly need to be changed).

zeljko

Reply by email