SVGHMI: Added text box for tranformation feedback aside widget mignature svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 13 Apr 2021 21:00:34 +0200
branchsvghmi
changeset 3228 80f96db773bd
parent 3227 d5b2369a103f
child 3229 c5be4fd425e7
SVGHMI: Added text box for tranformation feedback aside widget mignature
svghmi/ui.py
--- a/svghmi/ui.py	Fri Apr 09 09:47:06 2021 +0200
+++ b/svghmi/ui.py	Tue Apr 13 21:00:34 2021 +0200
@@ -142,15 +142,18 @@
         self.Config = wx.ConfigBase.Get()
         self.libdir = self.RecallLibDir()
 
-        sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=0)
+        sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=4, vgap=0)
         sizer.AddGrowableCol(0)
         sizer.AddGrowableRow(1)
         self.libbutton = wx.Button(self, -1, _("Select SVG widget library"))
         self.widgetpicker = WidgetPicker(self, self.libdir)
         self.preview = wx.Panel(self, size=(-1, _preview_height + 10))
+        self.comment = wx.TextCtrl(self, size=wx.Size(-1, 80),
+                                   style=wx.TE_READONLY | wx.TE_MULTILINE)
         sizer.AddWindow(self.libbutton, flag=wx.GROW)
         sizer.AddWindow(self.widgetpicker, flag=wx.GROW)
         sizer.AddWindow(self.preview, flag=wx.GROW)
+        sizer.AddWindow(self.comment, flag=wx.GROW)
         sizer.Layout()
         self.SetAutoLayout(True)
         self.SetSizer(sizer)
@@ -190,9 +193,7 @@
             w = self.bmp.GetWidth()
             dc.DrawBitmap(self.bmp, (sz.width - w)/2, 5)
 
-        if self.msg:
-            dc.SetFont(self.GetFont())
-            dc.DrawText(self.msg, 25,25)
+        self.comment.SetValue(self.msg)
 
 
     def OnSelectLibDir(self, event):