163 |
self.Layout() |
self.Layout() |
164 |
|
|
165 |
def end_dialog(self, result): |
def end_dialog(self, result): |
166 |
"""If the dialog is closed with OK, set chosen layer as layer |
"""If the dialog is closed with OK, set chosen layer as layer |
167 |
to be opened. |
to be opened. |
168 |
""" |
""" |
169 |
self.result = result |
self.result = result |
276 |
|
|
277 |
|
|
278 |
def GetTable(self): |
def GetTable(self): |
279 |
"""Return the chosen DB connection, the table to be opened, |
"""Return the chosen DB connection, the table to be opened, |
280 |
the connection string for ogr and the ID column. |
the connection string for ogr and the ID column. |
281 |
""" |
""" |
282 |
i = self.lb_tables.GetSelection() |
i = self.lb_tables.GetSelection() |
366 |
# The standard button box at the bottom of the dialog |
# The standard button box at the bottom of the dialog |
367 |
buttons = wx.FlexGridSizer(1, 2, 0, 0) |
buttons = wx.FlexGridSizer(1, 2, 0, 0) |
368 |
ok_button = wx.Button(self, ID_DBCHOOSE_OK, _("OK")) |
ok_button = wx.Button(self, ID_DBCHOOSE_OK, _("OK")) |
369 |
wx.EVT_BUTTON(self, ID_DBCHOOSE_OK, self.OnOK) |
self.Bind(wx.EVT_BUTTON, self.OnOK, ok_button) |
370 |
buttons.Add(ok_button, 0, wx.ALL|wx.ALIGN_RIGHT, 4) |
buttons.Add(ok_button, 0, wx.ALL|wx.ALIGN_RIGHT, 4) |
371 |
cancel_button = wx.Button(self, ID_DBCHOOSE_CANCEL, _("Cancel")) |
cancel_button = wx.Button(self, ID_DBCHOOSE_CANCEL, _("Cancel")) |
372 |
wx.EVT_BUTTON(self, ID_DBCHOOSE_CANCEL, self.OnCancel) |
self.Bind(wx.EVT_BUTTON, self.OnCancel, cancel_button) |
373 |
buttons.Add(cancel_button, 0, wx.ALL, 4) |
buttons.Add(cancel_button, 0, wx.ALL, 4) |
374 |
top.Add(buttons, 1, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 4) |
top.Add(buttons, 1, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 4) |
375 |
|
|