Coder Social home page Coder Social logo

Comments (7)

harborsiem avatar harborsiem commented on June 2, 2024

You are right. There should be an ExecuteEvent for tab and some more controls.
I will try to fix it.

from windowsribbon.

harborsiem avatar harborsiem commented on June 2, 2024

I have debugged the ExecuteEvent for Ribbon tabs. From UIRibbon there is no ExecuteEvent fireing for the tab.
listening-for-ribbon-events speek about additional events for the UIRibbon. But the documentation is a bit of poor for Implementation. The Interfaces are implemented in the RibbonLib. You can try to work with these interfaces if you really need an event for the ribbon tab.
If it works then you can drop a Pull request.

from windowsribbon.

montagnamarco avatar montagnamarco commented on June 2, 2024

I was able to do it but there is a little thing to pay attention.
I use VB.NET.
The trick is using the EventLogger in this way:

AddHandler Ribbon1.EventLogger.LogEvent, Sub(sender As Object, args As EventLoggerEventArgs)
                                             If args.EventType = Interop.EventType.TabActivated Then
                                                 Select Case args.CommandName
                                                     Case "tabDocuments"
                                                         multiPaginaPrincipale.SelectedIndex = 1
                                                     Case Else
                                                         multiPaginaPrincipale.SelectedIndex = 0
                                                 End Select
                                             End If
                                         End Sub

But when building to x64 as I always do, the memory layout of the EventParameters struct was corrupted because in 64 bit environment the FieldOffset in this particular case is 8 and not 4, so the entire EventParametersCommand field is shifted of 4 bytes and the CLR was returning an access violation error because the pointers of the command names strings were invalid.
I suggest to handle this particular situation. I have downloaded the code and created a custom build, I support only x64 systems.

from windowsribbon.

harborsiem avatar harborsiem commented on June 2, 2024

@montagnamarco
Thanks for detailed analysis.
I have done some changes in the EventParameters struct which should work in x86 and x64.
Could you please download the latest code and create a custom build?

from windowsribbon.

consulpiu avatar consulpiu commented on June 2, 2024

Hi! It seems to work fine now :-) Thank you!

from windowsribbon.

montagnamarco avatar montagnamarco commented on June 2, 2024

The previous comment was written by me, from a different GH account.

from windowsribbon.

harborsiem avatar harborsiem commented on June 2, 2024

Solved in Pre-Release v2.15.2

from windowsribbon.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.