Showing icon in dialog box



  • On 12/01/2015 at 03:36, xxxxxxxx wrote:

    Hello,

    I like to show an icon in the Python Dialog. So far I thought it would be simple, but somehow I'm stuck right at the beginning.

    First off I get the icon properties:

    icon = gui.GetIcon(c4d.RESOURCEIMAGE_MOVE)  
    bmp = icon["bmp"]  
    x, y = icon["x"], icon["y"]
    

    then I thought I could simply draw it, but I need a GeUserArea for that, right? Does that still function if I create the layout with AddStaticText?

    For instance, I've got a simple dialog box with the selected object including the icon written in that dialog box: "Selected Object: [Icon] Cube"

    How does one do that?



  • On 12/01/2015 at 09:13, xxxxxxxx wrote:

    Hello,

    there is no simple GUI element that just displays images. One way to display a bitmap is to use a GeUserArea and then draw the Bitmap using DrawBitmap(). A example on how to use the GeUserArea can be found in the Py-MemoryViewer.pyp example.

    Another way to display images is to use a BitmapButtonCustomGui. Using this option allows you to directly use the icon data delivered by GetIcon().

    What do you mean with "create the layout with AddStaticText"? You create layouts using groups with GroupBegin() and GroupEnd(). There you can define the number of columns.

    For what you want you could also use a default LinkBoxGui element. Such a link box displays the linked object with it's icon.

    Best wishes,
    Sebastian



  • On 23/01/2015 at 08:20, xxxxxxxx wrote:

    Hello TechnoFeather,

    was your question answered?

    best wishes,
    Sebastian


Log in to reply