mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Don't call BringToFront() on the dialog object, but call GetDialogWindow() to get a window object.
This commit is contained in:
parent
4789b3ae05
commit
ab48e905b5
1 changed files with 3 additions and 3 deletions
|
@ -217,10 +217,10 @@ class ProgressBar:
|
||||||
self.maxval = maxval
|
self.maxval = maxval
|
||||||
self.curval = -1
|
self.curval = -1
|
||||||
self.d = GetNewDialog(id, -1)
|
self.d = GetNewDialog(id, -1)
|
||||||
self.title(title)
|
|
||||||
self.label(label)
|
self.label(label)
|
||||||
self._update(0)
|
self._update(0)
|
||||||
self.d.AutoSizeDialog()
|
self.d.AutoSizeDialog()
|
||||||
|
self.title(title)
|
||||||
self.d.ShowWindow()
|
self.d.ShowWindow()
|
||||||
self.d.DrawDialog()
|
self.d.DrawDialog()
|
||||||
|
|
||||||
|
@ -231,13 +231,13 @@ class ProgressBar:
|
||||||
|
|
||||||
def title(self, newstr=""):
|
def title(self, newstr=""):
|
||||||
"""title(text) - Set title of progress window"""
|
"""title(text) - Set title of progress window"""
|
||||||
self.d.BringToFront()
|
|
||||||
w = self.d.GetDialogWindow()
|
w = self.d.GetDialogWindow()
|
||||||
|
w.BringToFront()
|
||||||
w.SetWTitle(newstr)
|
w.SetWTitle(newstr)
|
||||||
|
|
||||||
def label( self, *newstr ):
|
def label( self, *newstr ):
|
||||||
"""label(text) - Set text in progress box"""
|
"""label(text) - Set text in progress box"""
|
||||||
self.d.BringToFront()
|
self.d.GetDialogWindow().BringToFront()
|
||||||
if newstr:
|
if newstr:
|
||||||
self._label = lf2cr(newstr[0])
|
self._label = lf2cr(newstr[0])
|
||||||
text_h = self.d.GetDialogItemAsControl(2)
|
text_h = self.d.GetDialogItemAsControl(2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue