Project

General

Profile

Actions

Feature #93

closed

opening a form with a tab view

Added by I. Denisov almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/11/2016
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by I. Denisov almost 10 years ago

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
Actions #2

Updated by I. Denisov almost 10 years ago

  • Subject changed from Opening a Form with a Tab View to opening a form with a tab view
Actions #3

Updated by I. Denisov almost 10 years ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)
Actions #4

Updated by I. Denisov almost 10 years ago

  • 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.

Actions

Also available in: Atom PDF