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
Hi,

If you are using the NOV controls from the toolbox, then yes, you will have to use the Widget property of each control to access the NOV widget hosted in it. Please note that if you use controls from the toolbox you are sacrificing the portability of your code, which is one of the greatest powers of NOV. If you code your application directly by using NOV widgets instead of WinForm controls via the Visual Studio designer you will be able to compile and run your application on all platforms supported by NOV (currently Windows (WinForms and WPF), Mac and Silverlight) from a single codebase.

The following is a simple example that shows how to create some NOV widgets directly in code without using the Visual Studio designer - the NOV UI is created in the CreateNovContent method:
public partial class Form1 : Form
  {
   public Form1()
   {
      InitializeComponent();

      // Create the NOV content and place it in a NOV widget host on the form
      NWidget novContent = CreateNovContent();
      NNovWidgetHost<NWidget> host = new NNovWidgetHost<NWidget>(novContent);
      host.Dock = DockStyle.Fill;
      Controls.Add(host);
   }

   private NWidget CreateNovContent()
   {
      NStackPanel stack = new NStackPanel();
      stack.Padding = new NMargins(NDesignConstants.HorizontalSpacing, NDesignConstants.VerticalSpacing);
      stack.VerticalSpacing = NDesignConstants.VerticalSpacing;

      // Create a button
      NButton button = new NButton("Button");
      stack.Add(button);

      // Create a button with image and text
      NButton imageButton = NButton.CreateImageAndText(Nevron.Nov.Presentation.NResources.Image_File_Open_png, "Open");
      stack.Add(imageButton);

      // Create a check box
      stack.Add(new NCheckBox("Check Box"));

      return stack;
   }
  }


For more information on hosting NOV in a Windows Forms application, you can check out the Hosting NOV in Windows Forms documentation topic.


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