[lazarus] Programmatically showing the listbox of combobox

hernan.et at pg.com hernan.et at pg.com
Tue Jun 10 21:01:28 EDT 2003


Hi Jesus,

>Hi, I have noticed that sometimes (for example when clicking out of
>the listbox) the DroppedDown property doesnt get updated. Also it
>seems that the listbox doesnt get the keyboard focus when pop up.

Do you mean, the listbox is not closed/hidden? If you set csdropdownlist and the text in the entry is not in the list, it will not close/update the combobox.

>While you are in this [ and if you have enought time ;)] could you
>check if it is possible to trap all keyboard events before the
>gtkwidget? It happen that TComboBox only have the keyboard control
>when the itemindex=0 {VK_UP} or ItemIndex=Count-1 {VK_DOWN}.

Please expound, I don't quite understand what you mean. Or better yet, what do you want to do, maybe I can be of help.

>In windows I was used to the ALT+DOWN hot key to dropdown the
>listbox, in linux it seems it is not possible, which would be a
>appropiated hotkey to this?.

I think this is a GTK stuff, maybe we can simulate, but its going to be ugly. But do note, that when you set csdropdownlist and maybe autodropdown
 (though I am not sure what is the purpose of autodropdown, "Mattias can you explain what is the purpose of autodropdown?") the listbox should automatically
show up when you press any key without the need to press ALT+DOWN .


>I dont know if I need to make some adjustment somewhere, It seems
>that Undo functionality is missing in Gtk (for TEdit)?
Maybe I can also check this at home.

Regards,

Yoyong
>Thanks.
>
> --- hernan.et at pg.com escribió: > Hi Mattias,
>>
>> If I understand it right, I have to set csdropdownlist and
>> autodropdown property
>> to drop the listbox automatically?
>>
>> Regards,
>>
>> Yoyong
>>
>>
>>
>>
>> On Tue, 10 Jun 2003 07:43:27 +0800
>> hernan.et at pg.com wrote:
>>
>> > Hi Mattias,
>> >
>> > This one is not included in cvs.
>> >
>> > under protected section of TCustomComboBox
>> >
>> > procedure WMChar(var Message: TLMChar); message LM_CHAR;
>> >
>> > its implementation is
>> >
>> > Why need this one? Well, if csdropdonwlist is selected in the
>> object
>> > inspector, the listbox must dropdown if the user type some
>> character in
>> > the textbox entry.
>>
>> In Delphi the csdropdonwlist style is defined as a combobox with
>> readonly
>> text field.
>> Do you mean the AutoDropDown property?
>>
>>
>> > procedure TCustomComboBox.WMChar(var Message: TLMChar);
>>
>> The LCL tries to use methods instead of messages. I overrode the
>> KeyDown
>> method. Maybe you can have a look.
>>
>>
>> > Please forgive me again this time for not sending a patch file.
>>
>> I forgive. ;)
>> Any help is welcome.
>>
>>
>> Mattias






More information about the Lazarus mailing list