Feature #93
closed
opening a form with a tab view
Added by I. Denisov almost 10 years ago.
Updated almost 10 years ago.
Description
When you open (using OpenAux for example) a Form it is automatically converted from Layout mode to Mask mode which is a real convenience. However Forms on the Tabs of a Tab View in a Form are not converted.
Robert: The version of StdApi.ThisMask below fixes the issue.
PROCEDURE ThisMask (param: ARRAY OF CHAR): Views.View;
VAR v, tv, w: Views.View; c: Containers.Controller; rd: FormModels.Reader; k: INTEGER; label: Dialog.String;
BEGIN
v := ThisDialog(param);
IF v # NIL THEN
WITH v: Containers.View DO
c := v.ThisController();
IF c # NIL THEN
c.SetOpts(c.opts - {Containers.noFocus} + {Containers.noCaret, Containers.noSelection});
WITH c: FormControllers.Controller DO
rd := c.form.NewReader (rd);
LOOP
rd.ReadView (tv);
IF tv = NIL THEN EXIT END;
WITH tv: StdTabViews.View DO
FOR k := 0 TO tv.NofTabs() - 1 DO
tv.GetItem(k, label, w);
WITH w: Containers.View DO
w.ThisController ().SetOpts(c.opts)
ELSE
END
END
ELSE
END
END
ELSE
END
ELSE Dialog.ShowMsg("#System:NotEditable")
END
ELSE Dialog.ShowMsg("#System:ContainerExpected")
END
END;
RETURN v
END ThisMask
- Subject changed from Opening a Form with a Tab View to opening a form with a tab view
- Tracker changed from Bug to Feature
- Description updated (diff)
- Status changed from In Progress to Closed
- % Done changed from 60 to 100
Josef made and elegant solution with modeHook, so now tabs in tabs also inheriting mask mode.
Also available in: Atom
PDF