ListBox, How to force a Click...

  • Thread starter Thread starter Bernardo
  • Start date Start date
B

Bernardo

Hi,

Hi have a Listbox whith some values but I want to select
the first line and execute the routine on_click.
I selected allready the list value, but how can Y force
the click event?

Thanks for your help
Bernardo
 
Bernardo said:
Hi,

Hi have a Listbox whith some values but I want to select
the first line and execute the routine on_click.
I selected allready the list value, but how can Y force
the click event?

Even if you can, would it not be better to move the code to another
procedure and have both the on_click event and your selection code call
that?
 
Just try to call the function "listBox_Click"* from function where you
selected list value...
 
Hi bernardo,

If you have the OnSelectedIndexChange event of the listbox hooked to a
method then if you change the SelectedIndex property it automatically call
the handlers. Yo do not need to call them !!!

See that there is not an OnClick event for the listbox class.


Happy new Year,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top