Kevin Ollivier wrote:
How are you sizing the webkitctrl? It is somewhat quirky about sizing because there are issues with the Cocoa<->Carbon bridge, unfortunately, so this may have nothing to do with PyAUI at all.
Hi Kevin!
As far as my webkitctrl, I have made a BrowserPanel class that subclasses wx.Panel. It is a cross platform browser. From my __init__ method for BrowserPanel I do this:
if wx.Platform == '__WXMAC__':
self.browser_ctrl = WebKitCtrl(self, -1, self.base_admin_url, wx.DefaultPosition, style=0)
self.__do_layout()
def __do_layout(self):
browser_grid_sizer = wx.FlexGridSizer(1, 1, 0, 0)
browser_grid_sizer.Add(self.browser_ctrl, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
self.SetAutoLayout(True)
self.SetSizer(browser_grid_sizer)
browser_grid_sizer.Fit(self)
browser_grid_sizer.SetSizeHints(self)
browser_grid_sizer.AddGrowableRow(0)
browser_grid_sizer.AddGrowableCol(0)
(sorry this is so awful, I am cutting and pasting into Thunderbird)
# FrameManager
self.frame_manager = PyAUI.FrameManager()
self.frame_manager.SetFrame(self)
self.custom_dockart = CustomDockArt()
self.frame_manager.SetArtProvider(self.custom_dockart)
# Create panes
self.main_tree_ctrl = MainTreeCtrl(self, products.Product(), 'Inventory', 'Catalogs')
self.browser_ctrl = BrowserPanel(self)
# Add panes to manager
self.frame_manager.AddPane(self.main_tree_ctrl, PyAUI.PaneInfo().
BestSize(wx.Size(200,-1)).
Name("TreeCtrl").Caption(self.main_tree_ctrl.caption).
Left().Layer(1).Position(1))
self.frame_manager.AddPane(self.browser_ctrl, PyAUI.PaneInfo().Name('Browser').
CenterPane())
So I create a frame manager and am adding a tree control instance on left and browser panel instance as center pane (main panel). There are no other panes. When I do this I can still get a hint (vertical line) for sizing the browser panel but it will not make the browser panel smaller only larger. Other panels like a textctl seem to be ok as in the demo with PyAUI. That is, you can get the hint and can easily move it to the right to make the panel smaller or move it to the left to make the panel larger. With Webkit I can make it larger moving the hint to the left making it larger but i cannot move the hint to the right to make it smaller. If you need more info, please let me know.
Regards
David
···
From my frame __init__ method: