GithubHelp home page GithubHelp logo

Comments (4)

mirek-fidler avatar mirek-fidler commented on June 11, 2024

I guess that is a bit of misunderstanding here.. Documentation describes interface. You are checking StdDisplay, which is not really designed to render Images. If you use Paint, it will paint text as well.

Example of Display that renders Image is CenteredImageDisplay.

That said there is probably no reason for StdDisplay not to display Images, so I will probably add that feature anyway.

from ultimatepp.

schutm avatar schutm commented on June 11, 2024

Problem was I couldn't change the usage of StdDisplay as it was being used (indirectly) by SyncInfo of MultiButton. And I used the SetDisplay of the MultiButton with a display to show images. However hovering over the image triggered the display of a SyncInfo, because the text ('image 32x32') was larger than the MultiButton control itself. I got around it by using AttrText and Convert, but that seemed a bit contrived.

Thanks for the fix. I'll test it in following few days.

from ultimatepp.

mirek-fidler avatar mirek-fidler commented on June 11, 2024

from ultimatepp.

schutm avatar schutm commented on June 11, 2024

This works now.

I used a custom Display.

Looking at line 614 in MultiButton.cpp a call is made to DisplayPopup::Set (line 137 in DisplayPopup.cpp). At line 145 a call is made to DisplayPopup::Pop::Set (line 110 in DisplayPopup.cpp) and here at line 131 a call is made to DisplayPopup::Pop::Sync. Finally in this method at line 60 a call is made to Display::GetStdSize (line 115 in Display.cpp). This last line always uses the StdDisplayClass (as the name suggests). I didn't expect this to happen when displaying a PopUp from the MultiButton.

For short, using de MultiButton with a custom Display will still use the StdDisplayClass for the popup (not a problem for me anymore, as my custom Display just shows an Image which now recognized by StdDisplayClass)

from ultimatepp.

Related Issues (20)

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.