Seite 1 von 1

wxDialog positionieren.

Verfasst: Dienstag 24. Januar 2006, 21:29
von leobm
Wie kann ich einen Dialog positionieren. In meinem Fall an einem
wx.TextCtrl.... ?

Oder geht das unter Windows nicht ?

Code: Alles auswählen

class NumericInputDialog(wx.Dialog):

    def __init__( self, parent, inputField,id=-1, title='', size=wx.Size(100,120), pos=wx.Point(1,1), style=wx.THICK_FRAME):
        self.inputField = inputField
        rect = self.inputField.GetRect()
        x = int(rect[0])+int(rect[2])
        y = int(rect[1])+int(rect[3])
        pos = wx.Point(x,y)
        pre = wx.PreDialog()
        pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
        pre.Create(parent, id, '', pos, size, style)
        pre.SetPosition(wx.Point(x,y))

        self.PostCreate(pre)
         .....


Verfasst: Mittwoch 25. Januar 2006, 00:32
von leobm
hat sich erledigt.
Mein Fehler.
In der Parent Komponente hatte ich noch ein dlg.CenterOnScreen()...

trotzdem danke