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
[URL-REMOVED]and then draw the Bitmap usingDrawBitmap()
[URL-REMOVED]. A example on how to use the GeUserArea can be found in thePy-MemoryViewer.pyp
[URL-REMOVED] example.Another way to display images is to use a
BitmapButtonCustomGui
[URL-REMOVED]. Using this option allows you to directly use the icon data delivered byGetIcon()
[URL-REMOVED].What do you mean with "create the layout with AddStaticText"? You create layouts using groups with
GroupBegin()
[URL-REMOVED] andGroupEnd()
[URL-REMOVED]. There you can define the number of columns.For what you want you could also use a default
LinkBoxGui
[URL-REMOVED] element. Such a link box displays the linked object with it's icon.Best wishes,
Sebastian
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 23/01/2015 at 08:20, xxxxxxxx wrote:
Hello TechnoFeather,
was your question answered?
best wishes,
Sebastian