making a clock face
Nathan smith <[email protected]> Sun, 22 Nov 2020 21:39:15 +0000
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hello, In something I am working on I have the desire to create a screen which has in the top a button and a text box, The center of the screen should then be a clock face, Then at the bottom there should be a long text box showing the date. I know for the most part how to implement this and almost have the confidence to say I could draw a clock, at least a basic clock, using the wx.PaintDC but can this be drawn on a panel? More to the point, surely there is an easier way of doing this, I feel rather like I am reinventing the wheel. Related to this I looked into wx.lib.analogclock but did not see a way to update it with the time? So I'd want to make it so that the hands appear to show what the current time is, and shift in relation to this for each second. I figured I'd have: sizer 1 at the top for the button and text box. sizer 2 with wx.ALIGN_CENTER for the clock And sizer 3 for the long date bar at the bottom. On that topic though how can I stretch out a text box to make it, if not the length of the bottom of the screen, than at least align itself to the same width as the clock itself? Having written this, I admit to wondering if I'm simply going to have to draw it by hand, using calculations off of the screen size to roughly place things and hope for the best. Thanks in advance for any help. Nathan -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/4be12ead-5a5b-a61f-75ef-17b80dc36b26%40gmail.com.