On 4/7/21 2:45 am, 'Chris Barker' via wxPython-users wrote:
>
> I now have my meter working and now have to sort out how to
> incorporate
> it into it's own class. I have no idea how to do this, at the moment.
>
>
> create a subclass of wxPanel
>
> Create a method to draw the dial.
>
> Call that method from The OnPaint handler to a method that draws your
> dial.
>
> When the data changes, call Refesh() on your panel -- that will
> trigger a Paint event, which will re-draw the dial.
>
> You may want to have the dial itself be pre-saved to a bitmap, and
> then you can just re-draw the needle on top of it when things change.
>
Thank you Chris,
Perhaps I should have delayed my question until I'd had a good night's
sleep. I completed this project over a few days. Creating the dial in a
drawing programme was a far neater idea and saved a lot of coding.
--
Regards,
Phil