Re: associating a slider with a label
Nathan smith <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hi Dietmar,
Sorry about that:
Python version: 3.8.6 32 BIT
WX Version: '4.1.0 msw (phoenix) wxWidgets 3.1.4'
Windows: 10, 64 BIT
You mention drawing the labels yourself, how would I go about starting
that. Is that with a WX.Rectangle and then doing some fancy footwork to
capture when the slider has focus and then forcing the reader to speak?
If it helps here is the code I use to make a list box which seems to
work fine:
labell = wx.StaticText(panel, -1, "Time notification settings.")
hbox1.Add(labell, 0, wx.EXPAND|wx.ALIGN_LEFT|wx.ALL,5)
self.notes = wx.ListCtrl(panel, -1, style = wx.LC_REPORT)
hbox1.Add(self.notes, 1, wx.EXPAND|wx.ALIGN_LEFT|wx.ALL,5)
self.notes.InsertColumn(0, "Time Notification settings.")
c=['Never.', 'Hourly.', 'Every 15 minutes.', 'Every 30 minutes.',
'Only on the 45th minute.']
for x in range(len(c)):
self.notes.InsertItem(x, c[x])
self.notes.Focus(c.index(g.bong))
self.notes.Select(c.index(g.bong))
self.notes.Bind(wx.EVT_LIST_ITEM_SELECTED, self.changenote)
self.notes.SetName("Time Notification setting.")
Thanks in advance,
Nathan
On 27/10/2020 21:08, Dietmar Schwertberger wrote:
> On 26.10.2020 23:00, Nathan smith wrote:
>> Is there any workarounds for this?
> It seems the only workaround seems to be not to use style SL_LABELS
> and implement the labels yourself.
>
> From trying with wxPython 4.0.4 on 32 bit Python 3.7 on Windows 64
> bit, SL_LABELS seems to have problems there as well: the labels are
> not correctly drawn at first.
>
> Could be that the labels are now created as native static texts while
> previously they were drawn directly. This would explain why I get the
> label instead of the name.
>
> A quick look at wxWidgets/src/msw/slider.cpp did not show an obvious
> change, though.
>
>
> I assume you're on Windows, as I'm getting all accessibility related
> problem reports for Windows.
>
> You should always state your platform and versions. E.g. wxPython
> 4.0.4 to 4.0.7 on 32 bit and 64 bit Python versions sometimes do
> behave differently when it comes to accessibility with screen readers.
>
> Regards,
>
> Dietmar
>
--
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/ba77a891-69d4-f947-8e6d-dedfbfdcaa80%40gmail.com.