Commit 76fc5e46 authored by eric pellegrini's avatar eric pellegrini
Browse files

Bug fix related to the layout of wx.Dialog derived class

parent b5f6685b
......@@ -95,10 +95,7 @@ class PropertyDialog(wx.Dialog):
# Bind the top sizer to the dialog.
self.SetSizer(dlgsizer)
# Layout the widget.
self.Layout()
def GetValue(self, event=None):
"""
Handler called when the user clicks on the OK button of the property dialog.
......
......@@ -130,7 +130,7 @@ class PreferencesSettings(wx.Dialog):
self.build_dialog()
def build_dialog(self):
self._notebook = wxaui.AuiNotebook(self, wx.ID_ANY)
self._sectionPanels = collections.OrderedDict()
......@@ -177,7 +177,7 @@ class PreferencesSettings(wx.Dialog):
self.Bind(wx.EVT_BUTTON, self.on_default, defaultButton)
self.Bind(wx.EVT_BUTTON, self.on_apply, applyButton)
self.Bind(wx.EVT_BUTTON, self.on_ok, okButton)
def validate(self):
for widget in self._widgets.values():
......
......@@ -43,6 +43,8 @@ class RegistryViewer(wx.Dialog):
wx.Dialog.__init__(self, parent, wx.ID_ANY, size = (800,400), title="Registry viewer", style=wx.DEFAULT_DIALOG_STYLE|wx.MINIMIZE_BOX|wx.MAXIMIZE_BOX|wx.RESIZE_BORDER)
dialogSizer = wx.BoxSizer(wx.VERTICAL)
mainPanel = wx.Panel(self, wx.ID_ANY, size=self.GetSize())
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
......@@ -60,7 +62,11 @@ class RegistryViewer(wx.Dialog):
self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.on_double_click_data)
self.set_plugins_tree(self._root, REGISTRY._registry)
self.set_plugins_tree(self._root, REGISTRY._registry)
dialogSizer.Add(mainPanel,1,wx.EXPAND)
self.SetSizer(dialogSizer)
def set_plugins_tree(self, node, data):
......
......@@ -44,6 +44,8 @@ class UserDefinitionViewer(wx.Dialog):
self._udTree = {}
dialogSizer = wx.BoxSizer(wx.VERTICAL)
mainPanel = wx.Panel(self, wx.ID_ANY, size=self.GetSize())
self._tree = wx.TreeCtrl(mainPanel, wx.ID_ANY, style=wx.TR_DEFAULT_STYLE|wx.TR_HIDE_ROOT|wx.TR_EDIT_LABELS)
......@@ -77,6 +79,10 @@ class UserDefinitionViewer(wx.Dialog):
self.expand_ud(ud)
self.set_editable(editable)
dialogSizer.Add(mainPanel,1,wx.EXPAND)
self.SetSizer(dialogSizer)
def set_editable(self,editable=True):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment