ComboBox DropDownClosed event?


Author
Message
Damien Drummond
Damien Drummond
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 10, Visits: 24
I am testing your controls and I am using your combobox. Now if a user clicks on it and selects an item (where the item selected is different) then I can use your SelectedIndexChanged event to do something (in my case move focus back to another control). However, if they don't select a different item and the combobox closes what event is fired that I can use - nothing I can see from the little information I have?

With the standard combobox I had one event DropDownClosed and it handled the event whether a different item was selected or not.

Why do your controls lack the standard (essential) events that I should be able to use?

Also, since your documentation covers nothing relating to creating a style/theme for a ComboBox (or anything other than a button), how do I go about setting a default style for my ComboBox and is it possible to have two themes, and changing them depending what section of my application the user is in at time?

Thanks in advance.

D









Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
When the drop down popup of the NOV combo box closes it automatically sets focus back to the combo box. That is why your code is not working as expected - you set the focus to the data grid view in the Closed event but shortly after that the popup sets its back to the NOV combo box. A solution to this problem is to use a timer to focus the data grid view some time after the combo box drop down popup has closed (for example 0.1 sec after that) like show in the following piece of code:
comboBox.Popup.Closed += OnComboBoxDropDownPopupClosed;

private void OnComboBoxDropDownPopupClosed(NEventArgs arg)
{
  NTimer timer = new NTimer(100);
  timer.Tick += delegate() {
   timer.Stop();
   dataGridView1.Focus();
  };

  timer.Start();
}


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search