Hello,
I have this code:
import wx
class Plugin(wx.Panel):
def __init__(self, parent, *args, **kwargs):
panel = wx.Panel.__init__(self, parent, *args, **kwargs)
self.colorOver = ((89,89,89))
self.colorLeave = ((110,110,110))
self.colorFont = ((131,131,131))
self.SetBackgroundColour(self.colorLeave)
self.SetForegroundColour(self.colorLeave)
self.name = "Plugin"
self.overPanel = 0
self.overLabel = 0
sizer = wx.BoxSizer(wx.VERTICAL)
name = wx.StaticText(self, -1, ' ' + self.getName())
close = wx.StaticText(self, -1, ' X ')
gs = wx.GridSizer(2, 2, 0, 0)
gs.AddMany([(name, 0, wx.ALIGN_LEFT), (close, 0, wx.ALIGN_RIGHT)])
sizer.Add(gs, 1, wx.EXPAND)
self.SetSizer(sizer)
.... ....
Is it possible to left click on the StaticText close and hide the panel itself?