Hi All,<br>&nbsp;&nbsp;&nbsp; I have made a simple panel where i am loading an image from the folder. I have a button named zoomin. When i press this button a pair of horizontal and vertical scrollbars should appear on the image panel nearby image. so that we can see the zoomed image properly. I am trying to use wx.Scrollbar but i am not able to fix the scrollbars properly around the image. I have not added the scrollbar portion to the button handler in the code below.. i have just commented out as its not actually working. <br>
<br>import wx<br><br>class ComboBox(wx.Dialog):<br>&nbsp;&nbsp;&nbsp; def __init__(self, parent, id, title):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wx.Dialog.__init__(self, parent, id, title, size=(450, 470))<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panel = wx.Panel(self, -1, (75, 20), (100, 127), style=wx.SUNKEN_BORDER)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.picture = wx.StaticBitmap(panel)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.picture.SetBitmap(wx.Bitmap(&#39;srk.jpg&#39;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panel.SetBackgroundColour(wx.WHITE)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wx.Button(self, 1, &#39;Close&#39;, (80, 220))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wx.Button(self, 2, &#39;Zoomin&#39;, (80, 280))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Bind(wx.EVT_BUTTON, self.OnClose, id=1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Bind(wx.EVT_BUTTON, self.OnZoom, id=2)<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Centre()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.ShowModal()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Destroy()<br><br>&nbsp;&nbsp;&nbsp; def OnClose(self, event):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Close()<br><br>&nbsp;&nbsp;&nbsp; def OnZoom(self, event):<br>##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sw = wx.ScrolledWindow(panel)<br>
##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sw.SetScrollbars(20, 20, 155, 40)<br>
##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sw.Scroll(50,10)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Close()<br><br>app = wx.App()<br>ComboBox(None, -1, &#39;picture box&#39;)<br>app.MainLoop()<br><br><br>But can please anybody suggest me how should i go ahead and solve this problem ??<br>
<br clear="all"><br>-- <br>Varsha Purohit,<br>Graduate Student