GeUserArea Tool Tips
-
Hello,
Is there a tool tip for GeUserArea similar to BitmapButtonCustomGui's BITMAPBUTTON_TOOLTIP? I'd like to use the same tool tip as the rest of the C4D interface.Thank you!
-
You can react to the message
BFM_GETCURSORINFO
. See GUI and Interaction Messages Manual -
Hi @blastframe as @PluginStudent pointed it, you should use
BFM_GETCURSORINFO
.Here an example.
import c4d class UA(c4d.gui.GeUserArea): def __init__(self): super(UA, self).__init__() def DrawMsg(self, x1, y1, x2, y2, msg) : self.OffScreenOn() self.SetClippingRegion(x1, y1, x2, y2) self.DrawSetPen(c4d.Vector(1.0, 0, 0)) self.DrawRectangle(x1, y1, x2, y2) def GetMinSize(self): return 200, 200 def Message(self, msg, result): if msg.GetId() == c4d.BFM_GETCURSORINFO: result.SetId(c4d.BFM_GETCURSORINFO) result.SetInt32(c4d.RESULT_CURSOR, c4d.MOUSE_POINT_HAND) result.SetString(c4d.RESULT_BUBBLEHELP_TITLE, "Bubblehelp Title") result.SetString(c4d.RESULT_BUBBLEHELP, "This is an example GeUserArea") return True return c4d.gui.GeUserArea.Message(self, msg, result) class ExampleDialog(c4d.gui.GeDialog): ID_UA = 10001 def CreateLayout(self): self.SetTitle("UserArea Example") self.ua = UA() self.AddUserArea(self.ID_UA, c4d.BFH_LEFT | c4d.BFV_TOP) self.AttachUserArea(self.ua, self.ID_UA) return True def main(): global dlg dlg = ExampleDialog() dlg.Open(c4d.DLG_TYPE_ASYNC, xpos=-2, ypos=-2, defaultw=400, defaulth=400) if __name__=='__main__': main()
Cheers,
Maxime. -
@m_adam & @PluginStudent Thank you both! This was exactly what I needed. This forum is so so helpful.
-
This post is deleted!