Recent

Author Topic: What Exactly does the "ArrayKeysTraverseList" actually do in Combo Boxes?  (Read 714 times)

jamie

  • Hero Member
  • *****
  • Posts: 3524
While working on the TComboBoxEx and looking at the TCombobox because it is the base class to it, I noticed the property ArrayKeysTraverseList does not seem to do anything ?

 Can someone explain to me what it suppose to do ?
The only true wisdom is knowing you know nothing

dsiders

  • Sr. Member
  • ****
  • Posts: 373
While working on the TComboBoxEx and looking at the TCombobox because it is the base class to it, I noticed the property ArrayKeysTraverseList does not seem to do anything ?

 Can someone explain to me what it suppose to do ?

 You mean ArrowKeysTraverseList obviously. It's passed to the widgetset class. It's implemented for GTK key handling, but none of the others seem to use it (implementation is empty).
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

jamie

  • Hero Member
  • *****
  • Posts: 3524
Ok I understand but what is the exact behavior pattern?
Does it control the scroll in the edit box while there is no drop down
Or does control both?
 While working on the tcomboboxex control there is an option that l
Want to implement to make it closer to Delphi operations.
I can do this I simply need the exact behavior expected.
The only true wisdom is knowing you know nothing

dsiders

  • Sr. Member
  • ****
  • Posts: 373
Ok I understand but what is the exact behavior pattern?
Does it control the scroll in the edit box while there is no drop down
Or does control both?
 While working on the tcomboboxex control there is an option that l
Want to implement to make it closer to Delphi operations.
I can do this I simply need the exact behavior expected.

For GTK, it calls  gtk_combo_set_use_arrows. See here: https://docs.huihoo.com/gtk/tutorial/2.0/x1065.html.

I don't have a GTK-based system, so I can't confirm or deny.
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

jamie

  • Hero Member
  • *****
  • Posts: 3524
Ok, I'll see what I can do to get that working in the TComboBoxEX control because there is a property setting within the AutoComplete for that control that is specific..

 I was thinking of actually removing the ArrayKeysTraverseList property from the published list and use the one that is inside the AutoComplete sets.

  Also the AutoCompleteText is not Delphi compatible and it does nothing for this control anyways, that may also be removed from the Published list

The only true wisdom is knowing you know nothing

dsiders

  • Sr. Member
  • ****
  • Posts: 373
Ok, I'll see what I can do to get that working in the TComboBoxEX control because there is a property setting within the AutoComplete for that control that is specific..

 I was thinking of actually removing the ArrayKeysTraverseList property from the published list and use the one that is inside the AutoComplete sets.

  Also the AutoCompleteText is not Delphi compatible and it does nothing for this control anyways, that may also be removed from the Published list

Seems like ComboBox gets mucked up in some way pretty often these days.

I would be cautious above removals in ancestor/base classes. I've already come across one component set that was broken by the ReadOnly removal (Eye Candy Controls). And I don't use that many non-stock controls. Keep in mind that everything removed from TCustomComboBox is going to break something downstream. And there is no way to know who that'll be.

Good luck.
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

jamie

  • Hero Member
  • *****
  • Posts: 3524
breakage seems to be the norm around here..

if you are on windows there is a solution of putting the combobox back into READ only mode
but this only works with windows now of course.

Currently I am trying to come up with a way to allow the Array keys to traverse the list without making any selections, because this just fires all the events related to this...

 I can I suppose capture a message coming from the OS when a selection is made and then look back as to which key made the selection but then again, OS issue, not sure of these messages are supported cross platform..

 With the mouse you can highlight any selection you want was you hover over the items and no actual selection is made.

 This is what I want with the arrow keys, have any ideas ?
The only true wisdom is knowing you know nothing

PascalDragon

  • Hero Member
  • *****
  • Posts: 2120
  • Compiler Developer
I would be cautious above removals in ancestor/base classes. I've already come across one component set that was broken by the ReadOnly removal (Eye Candy Controls). And I don't use that many non-stock controls. Keep in mind that everything removed from TCustomComboBox is going to break something downstream. And there is no way to know who that'll be.

The ReadOnly property has been deprecated for multiple years and has not worked as expected anyway.

 

TinyPortal © 2005-2018