Autore Topic: [RISOLTO] problema chiamata evento  (Letto 497 volte)

Offline doublemm

  • Maestro Gambero
  • ****
  • Post: 445
    • Mostra profilo
[RISOLTO] problema chiamata evento
« il: 29 Settembre 2010, 23:32:14 »
ciao a tutti, scusate se è un po che non mni faccio sentire ma qui il tempo è sempre meno.

non capisco perchè sul seguente codice non funziona la chiamata all'evento pulsante1_Click(). già usata altre volte allo stesso modo:

Codice: gambas [Seleziona]

PUBLIC SUB GridView1_DblClick()
DIM MioIngrediente AS TextBox
DIM ButtonEsci AS Button

  MioForm = NEW Form
  WITH MioForm
    .Title = "MODIFICA"
    .H = 200
    .W = 800
    .Center
  END WITH
  
  MioIngrediente = NEW TextBox(MioForm)
  WITH MioIngrediente
    .h = 10
    .w = 230
    .x = 10
    .y = 10
    .Enabled = FALSE
    .Text = GridView1[GridView1.Row, 1].Text
  END WITH
  
  ButtonEsci = NEW Button(MioForm) AS "pulsante1"
  WITH ButtonEsci
    .h = 20
    .W = 130
    .x = MioForm.Width - ButtonEsci.Width - 10
    .y = MioForm.Height - ButtonEsci.Height - 10
    .Text = "ESCI"
    .Enabled = TRUE
  END WITH
  
  MioForm.Show
  MioIngrediente.Show
  ButtonEsci.Show  
    
END

PUBLIC SUB pulsante1_Click()
  
  MioForm.Close
  
END


« Ultima modifica: 29 Settembre 2010, 23:42:24 da doublemm »
Matteo DoubleMM Mion

Offline doublemm

  • Maestro Gambero
  • ****
  • Post: 445
    • Mostra profilo
Re: problema chiamata evento
« Risposta #1 il: 29 Settembre 2010, 23:42:08 »
trovato l'errore

MioForm.Show va sostituito con MioForm.ShowModal altrimenti il focus resta sulla form dove c'è la GridView1
Matteo DoubleMM Mion