WxTextEntryDialog-WxBasic

From WxWiki
Revision as of 12:44, 11 July 2006 by 71.115.0.214 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  frame=new wxFrame(0,-1,"wxTextEntryDialog",wxPoint(10,10),wxSize(320,200),wxCAPTION | wxSYSTEM_MENU)
  panel=new wxPanel(frame,-1)
  button=new wxButton(panel,-1,"cambia",wxPoint(120,50))
  testo=new wxTextCtrl(panel,-1,"Valore immesso",wxPoint(20,100),wxSize(250,20))
  etic=new wxStaticText(panel,-1, "------------",wxPoint(20,140))
  frame.Show(True)
 
  sub change(event)
     a= new wxTextEntryDialog(panel,"Messaggio","TITOLO","default") ' You can set here the default value.
     a.SetValue(testo.GetLineText(0)) 'But you can also change it, then.
     a.ShowModal() ' Show the dialog.
     etic.SetLabel(a.GetValue()) ' Change the label according to the dialog.
  end sub
  connect(button,wxEVT_COMMAND_BUTTON_CLICKED,"change")


Back to WxBasic Tutorial