Buttons


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
Okay, so I am new to the software and have tried to use a button in my c# WinForm application.

I can create and use the button just fine, but I want a custom look, so if I set the Background Fill to "Stock Gradient Fill" or anything else other than Automatic, I lose the hover over and click color changes.

I have looked everywhere to try and change this, but I can't locate it - what (basic) instruction am I missing?

I tried following some of the examples, and created a class file called MyFirstTheme - but how and where do I apply this to my project and is that what I actually have to do?

I want to set a theme/skin once and it then sets it for all the components added to my WinForm.

I am currently using Visual Studio 2017 Community, and after I installed NOV UI, I do not see what is shown in some of the instructions relating to creating projects (like creating a NOV Windows Form app) - did I install something incorrectly?

Lastly, I thought I would test the WinForm app on a Windows 2012 R2 Terminal Server and it crashes on loading, I am yet to dig into a little further, but is this compatible with Windows Server 2012 R2?

thanks.


Replies
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
Thanks for the information, but there was no answer to my problem...

I use the code I gave and the Closed event does not fire!! Even if I am using your controls from the toolbox, shouldn't it still fire?

If I follow your code, you create a Stack Panel to contain the NOV controls - is this essential? Does this then still interact okay with the rest of the components, even if they are stock ones?

I have tried to use your coding method - so dockstyle wills the entire window, but then I add my combobox, it doesn't get placed where I want it to, doesn't get filled with the data I have already coded for the combobox items and is stretched across the top of the app window - doesn't look like this is a winner for me!!

//PracticeLocationsCombo
NComboBox PracticeLocationsCombo = new NComboBox();
PracticeLocationsCombo.Location = new NPoint(92, 92);
PracticeLocationsCombo.Size = new NSize(200, 27);
stack.Add(PracticeLocationsCombo);


With the combobox, I add the items programmatically from a SQL database when the application opens, so how do I now do it if I am using your method? When the combobox closes it needs to set focus to a stock standard DataGridView (which will not be in the Stack Panel, so I assume that my coding will not change for this?

Also, does it mention anywhere in the documentation to use "Widget" if you don't create it in code and use the provided Widgets from the toolbox, I stumbled upon how to do it by accident? And lastly, why does it matter which way I use your controls, shouldn't I still have access to all the events and also find out what the heck these events are somewhere in some document? I can't find anywhere that there is a Closed event relating to the ComboBox.

Your support has been great, I can't fault it, you are extremely helpful and patient, but I seem to take a step forward and stop (or take a few back) because there is nothing anywhere to be able to assist me in moving forward without me contacting you - all of this could be avoided with clearer documentation and the wait is adding time pressure on this project. I code from a Design, not create a design from code - that may not be how everyone does it, but for me, I find it is the best as the interface with the client is extremely important to me and I need to see it.

The current application is a small part of a huge project, and I decided to try your controls with this component because it was relatively small and easy to code, but at this stage, I have spent more than a week just trying to style your components, the rest of the application is complete. So, I would like to continue with the large component, but I can't afford to spend months sending through questions, just to style a component, the project would balloon out for months and months.

The following questions I have asked still have not been answered anywhere...
1. How do I add a Tooltip to your buttons, the standard way for stock buttons doesn't work?
2. Can I have multiple themes, as I have different components/modules that currently has a different color scheme, Green, Blue and Red - so if the user clicks and changes to the module with say the red based theme and they are in the green module, then I need to be able to change themes on the fly - is this possible?

Just letting you know...
The Subscribe to Email still is not working, so I have no notification that you respond. Also, the live demos (on Windows 10 system) only works forcing Internet Explorer - Edge and FireFox do not work at all. Lastly, trying to read through the online documentation is like watching grass grow, no matter what browser is used, clicking on something, trying to search, etc. is painfully slow.
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,

You can use NOV controls from the toolbox, too, and they should work the same way they work when created through code. The only thing you are sacrificing when using the designer is portability of you code, because the WinForms designer generates platform specific code. This means that if want your NOV application to run on other platforms, too (i.e. to be cross platform) you should create your UI through code as shown in our previous post.

Regarding the combo box popup closed event, we tested it and it works fine even for NOV controls from the toolbox. Please try the following code:
NComboBox comboBox = nComboBoxControl1.Widget;
comboBox.Items.Add(new NComboBoxItem("Item 1"));
comboBox.Items.Add(new NComboBoxItem("Item 2"));
comboBox.Items.Add(new NComboBoxItem("Item 3"));
comboBox.SelectedIndex = 0;
comboBox.Popup.Closed += OnComboBoxDropDownPopupClosed;

private void OnComboBoxDropDownPopupClosed(NEventArgs arg)
{
    NPopupWindow popup = (NPopupWindow)arg.TargetNode;
    NComboBox comboBox = (NComboBox)popup.ParentNode;
    // Your code here
}


The NOV stack panel is just one of the layout panels you can use to automatically arrange your controls. For more information about panel, check out the Panels Overview topic and the other topics in the Panels folder. We are aware about the slow opening of the online documentation. It is caused by some server issues, so we are going to upgrade the help documentation server soon to resolve this issue. Until then you can use the local documentation that comes with the NOV installation in the form of a CHM file. You can find it in the NOV folder in the Start menu of your computer.

The placement of a NOV widget in its owner container is controlled through the widget's HorizontalPlacement and VerticalPlacement properties. They are by default set to Fit for most widgets and that is why you see them stretched. Change the values of these properties to a value you want. If you are using layout panels, don't forget to also set the panels HorzontalSpacing and/or VerticalSpacing properties in order to add some spacing between the widgets hosted in the panel.

The online examples of NOV use Silverlight, but unfortunately most major browsers already dropped support for it. That is why if you want to run the online examples, we recommend you use Internet Explorer. Please note that all of the examples also come with the NOV installation, so you can run them from your computer's start menu and evaluate their code.

Regarding your last 2 questions:

1. You can add a tooltip to any widget using its Tooltip property:
button.Tooltip = new NTooltip("My tooltip");


2. You can easily apply a new UI theme to your application using the ApplyTheme static method of the NApplication class:
NApplication.ApplyTheme(new CustomTheme());




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