Print Page | Close Window

Issue with pushbutton in VS2017

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=23638
Printed Date: 24 May 2018 at 11:09pm


Topic: Issue with pushbutton in VS2017
Posted By: Ron
Subject: Issue with pushbutton in VS2017
Date Posted: 10 May 2018 at 4:26pm
I have encountered a major issue with adding controls suite 18.3.0  (but also 17.1.0) as the pushbutton is not providing a click event. The click event as well as the 'clickevent' event are not triggering.
Normal forms buttons are fine. The axhost says that the click event for example is not available.
When I add a pushbutton,  it looks fine but as soon as I click it opens the designer code for a 'dropdown' event! And that is not even triggering when clicking the button.

I can not do anything more than I have done.

1. Add a reference to the xtremesuitecontrols 18.3 (registered)
2. Add the controls to the toolbar
3. Select the pushbutton
4. Click on it to get the code for the click event opened.
...

Can anyone tell me what I do wrong here? I am programming for over 30 years and experienced in .NET but i have not seen this behavior before.

Thanks,
Ronald




Replies:
Posted By: olebed
Date Posted: 12 May 2018 at 3:48pm
Hello Ron,

PushButton  don't exist for CommandBar/Ribbon, maybe you mean xtpControlButton ?

Such button's clicking is handled in CommandBars_Execute method, see our C# RibbonSample
private void CommandBars_Execute(object eventSender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs)
    {
        switch (eventArgs.control.Id)
        {

Regards,
 Oleksandr Lebed



Posted By: Ron
Date Posted: 12 May 2018 at 4:05pm
Hello,

I am talking about the XtremeSuiteControls, not the commandbars. The axPushbutton is causing the issue. So please review your answer.

Thank you


Posted By: olebed
Date Posted: 13 May 2018 at 4:29pm
Hello Ron,

I have confused buttons because seen "toolbar" but it is toolbar of VisualStudio.

So I investigated this question and can confirm that problem exists.  In C# VS solution you can choose method for Click event in appropriate tab Events of pane Properties. But default event for PushButton in designer is DropDown.

I can't find how to fix it now. I've found solution for controls which written on C# , but our ActiveX library written on C++. I have added this task in our task base.

Regards,

 Oleksandr Lebed



Print Page | Close Window