DlangUI: how to change AppFrames?
Ki Rill
rill.ki at yahoo.com
Tue Oct 24 08:20:19 UTC 2023
On Tuesday, 24 October 2023 at 05:03:51 UTC, Imperatorn wrote:
> On Tuesday, 24 October 2023 at 04:38:58 UTC, Ki Rill wrote:
>> I know how to change the current AppFrame:
>> ```D
>> window.mainWidget = myFrame;
>> ```
>>
>> But how do I exit this frame?
>>
>> I press the button, change to new frame, do the work, and now
>> I want to return to the previous frame. How would I do this?
>
> Saving the previous frame not an option?
It crashes if I reset it to the previous one.
```d
button.click = delegate(Widget src) {
// window.mainWidget = homeLayout.child(0);
window.mainWidget = myPreviousFrame;
return true;
};
// crash
```
More information about the Digitalmars-d-learn
mailing list