| Subject |
Re: Subform canClose |
| From |
Andy Taylor <andy.taylor.1959@outlook.com> |
| Date |
Mon, 08 Mar 2021 05:34:27 -0500 |
| Newsgroups |
dbase.getting-started |
Hi Peter,
In my view this is WAD.
A sub-form is exactly that; it should have no existence outside of it's parent.
If the parent closes the sub-form has to close before the parent does.. absolutely.
It might be helpful to explain why you want the sub-form to stick around?
Andy
> Hi
>
> I would like to prevent the Subform from closing. But the mainform
> should close. It seems that subform.canClose is effectiv for both forms.
>
> Bug or not?
>
> Peter
>
>
>
> ** END HEADER -- Diese Zeile nicht entfernen
> //
> // Erstellt am 08.03.2021
> //
> parameter bModal
> local f
> f = new neuForm()
> if (bModal)
> f.mdi = false // Nicht-MDI festlegen
> f.ReadModal()
> else
> f.Open()
> endif
>
> class neuForm of FORM
> with (this)
> onOpen = class::form_onOpen
> canClose = class::form_canClose
> metric = 6
> height = 250
> left = 100
> top = 80
> width = 600
> text = "Testform"
> endwith
>
> this.SubF = new subform(this)
> with (this.SubF)
> canClose = {||false}
> colorNormal = "Moccasin"
> metric = 6
> borderStyle = 4
> left = 600
> top = 60
> width = 400
> height = 230
> text = "Daten bearbeiten"
> visible = true
> sizeable = false
> moveable = false
> systemTheme = false
> maximize = false
> minimize = false
> escExit = false
> smallTitle = true
> endwith
>
> function form_onOpen
> form.SubF.open()
> return
>
> function form_canClose
> // do my things
> form.close()
> return
>
> endclass
|
|