[Gambas-user] Close button dont work in this case. Why???

Benoit Minisini gambas at ...1...
Thu Aug 30 13:34:19 CEST 2007


On jeudi 30 août 2007, Wellington de Souza Pinto wrote:
> Hi!
>
> If i call the forms in this method, the close button and me.close() not
> work. Why???
>
> ... Function Main()
>
>    Dim hForm as Form
>
>    hForm = New mForm
>    hForm.ShowModal()
>    hForm = Null
>
> END
>
> (in mForm) Have menu with 3 options (mySub1, mySub2, mySub3)
>
> In Click() method im call the next window
>
> mySub1.Show()
>
> When i click in X button in mySub1,2 or 3 FORM (Close Button, in caption)
> or use this code (ME.Close())
>
> DONT CLOSE THE FORMS!!!! WHY?????????????
>
> The (X) and Me.Close() not Work!!!
>
> myForm1.ShowModal (call) myForm2.Show (call) myForm3,4,5 and 6.Show
> The Close not work in myForm3,4,5 and 6 and if click in close in myform2
> the forms 3,4,5 and 6 are closed.
>
> Reguards,
>
> Souza Wellington
>

Sorry to my late answer, I didn't succeed in adding a comment to your post in 
the bug tracker. Maybe now it works, but I forgot to retry.

In the project you posted to the bug tracker, you open the first form with 
Show(), the second with ShowModal(), and the third with Show().

Normally, once a modal window is displayed, all following shown window should 
become modals.

Try with gb.gtk, you will see that the third Show() is silently replaced by a 
ShowModal().

But not in gb.qt! I tried to make these lastly opened windows "locally" modal, 
but I didn't succeed. So I recently reverted these changes and keep the 
gb.gtk behaviour...

You should try with the last svn revision and tell me if it works.

Regards,

-- 
Benoit Minisini




More information about the User mailing list