Hi,
on wx 2.8 I could easily modify labels using self.FindWindowByLabel(“Cancel”).SetLabel(“My label”). Unfortunately this doesn’t work on wx 2.9 . Probably because the progress dialog is now native (Windows Vista). So the idea is to use winapi for this. Unfortunatelly I didn’t manage to get window handle for the progress dialog - the GetHandle method returns 0 . I added snippet to illustrate this problem.
Thanks, I'll see if I can get access to the native task dialog's handle... I also see that the old generic progress dialog class is still available, so I'll add wrappers for it too.
···
On 9/9/11 3:14 AM, uhz wrote:
Hi,
on wx 2.8 I could easily modify labels using
self.FindWindowByLabel("Cancel").SetLabel("My label"). Unfortunately
this doesn't work on wx 2.9 . Probably because the progress dialog is
now native (Windows Vista). So the idea is to use winapi for this.
Unfortunatelly I didn't manage to get window handle for the progress
dialog - the GetHandle method returns 0 . I added snippet to
illustrate this problem.
Ok, I've fixed GetHandle for the wxProgressDialog for the next release, however the native task dialog is apparently not created immediately, so you will still get a zero handle until sometime after the task dialog has been shown, so it still may not be a good fit for your desire to change the labels, since the user will likely be able to see them change.
The wx.GenericProgressDialog will also be available in the next release.
···
On 9/9/11 3:14 AM, uhz wrote:
Hi,
on wx 2.8 I could easily modify labels using
self.FindWindowByLabel("Cancel").SetLabel("My label"). Unfortunately
this doesn't work on wx 2.9 . Probably because the progress dialog is
now native (Windows Vista). So the idea is to use winapi for this.
Unfortunatelly I didn't manage to get window handle for the progress
dialog - the GetHandle method returns 0 . I added snippet to
illustrate this problem.