1

I am creating a simple wx.Dialog box for my wxPython application. I have a panel inside that dialog box with many widgets and the size of the panel is larger than the dialog box. I want to scroll that panel using a wx.Slider. I don't want to use ScrolledPanel which is there by default in the library because the default windows scroller that appears for that looks dirty.

Can anyone guide me how to do such a thing. I mean how to scroll a panel. I am ready for using wx.PaintDc if needed.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Samyak
  • 109
  • 2
  • 8
  • Why reinvent the wheel? What do you mean by ScrolledPanel scroller looking dirty? Do you see the same problem in the wxPython demo? – Werner Nov 28 '14 at 11:10
  • What I meant by dirty is that it does not look good. I am developing an app for tablet running windows, so I need a good looking scroll bar to scroll widgets on a panel. I have created a scrollbar and what I want to do now is to drag a wx.panel using that slider. But I don't know how to do that. So, I needed some guidelines as to how to do that. – Samyak Nov 28 '14 at 13:15
  • The scrollbars should look as they look natively on the platform you're targeting. Of course, I've never developed for a tablet app (and luckily I will never have to do that), so I'm not sure what exactly you're expecting. If you don't like the appearance of the scrollbar, then you will have to handle all the scrolling events yourself. That being said, using a slider to do the job of a scrollbar is the first step towards the road of perdition. – Infinity77 Nov 28 '14 at 20:22
  • @Infinity77. Thanks a lot for your input. So, it means that I am on the wrong path. But is it possible to hide them at least. Please tell me as I have to make a new good looking scrollbar different than the standard one. Also if I have no choice but to use a Slider, could you please tell me how to handle the scrolling please. Thanks a lot. – Samyak Nov 30 '14 at 08:15
  • @samyak, did you test that wxPython runs on your target platform? – Werner Nov 30 '14 at 21:41
  • @Werner , Sorry for late reply. Yes I am using Miscro Surface Pro 2 running Windows 8 and so wxpython works exactly similar to any desktop/laptop running windows 8. – Samyak Dec 10 '14 at 01:36

0 Answers0