Search Results

Search found 4 results on 1 pages for 'hypertreelist'.

Page 1/1 | 1 

  • Escape key event problem in wxPython?

    - by MA1
    Hi All The following key event is not working. Any idea? class Frame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, title='testing', size=(300,380), style= wx.MINIMIZE_BOX|wx.SYSTEM_MENU |wx.CAPTION|wx.CLOSE_BOX|wx.CLIP_CHILDREN) self.tree = HyperTreeList(self, style = wx.TR_DEFAULT_STYLE | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_HAS_VARIABLE_ROW_HEIGHT | wx.TR_HIDE_ROOT) # create column self.tree.AddColumn("coll") self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) def OnKeyDown(self, event): keycode = event.GetKeyCode() print "keycode ", keycode if keycode == wx.WXK_ESCAPE: print "closing" self.Close() Regards,

    Read the article

  • How to get the width of a string in pixels?

    - by MA1
    I am using wxPython's HyperTreeList and I want to set the column width exactly equal to length of the largest string in it. To accomplish that, I'd like to to convert a python string size into pixels. For Example: If we have a string like str = "python" len(str) = 6 How could I convert the above string length/size into pixels? Is there another way?

    Read the article

1