Making a control ignored by the form Designer

Hi,

we have just bought the licence for TMS Scripter and I have some questions :

  1. First of all, I want to know the difference between : Locked, Protected and Transparent.

  2. I would like some controls to work like in Runtime and being totally ignored by the FormDesigner.
    Just imaging that I want to put on the edited form an objectInspector and a PaletteButtons (not in a separate form like in your demo), some buttons that I can clik on while the form design is active. How to achieve that ?

Best regards

Armindo

  • Locked: control cannot be moved or resized.
  • Protected: Cannot be moved, resized and cannot be selected or receive key actions, depending on ProtectMode property.
  • Transparent: Nothing can be done in the control. It behaves just like it's part of the painted background of the form.

For the control to be ignored by the form designer, add them to the ProtectedControls property.

Hi Wagner,
thanks for your reply, but I still have some problem when protecting some buttons, for instance when you want to make them calling copytoclipboard or pasteFromClipboard.
Attached the sample.
Best regards

Armindo
Project5.zip (95.2 KB)

What is the problem? Please provide exact steps to reproduce the issue.

Hi Wagner,
run the app.
Go in Design mode (click the button for this),
put a memo on the form (using the palette).
The try to copy, using the copy button, if doesn't work because it selects the form as control (because the button is protected).
It should have kept the memo as selected.
Best regards

Well, you are really stretching it here, as associated an action to the button. Don't do that. There is simply no way to reliably guarantee that everything will work as you expect, if you mix scripting design-time form with the runtime actions.

Set the button properties manually or simply move the button out of the form if you need actions to be supported.

Hi Wagner,
Bad news this means that we have to code in a antic way of coding.
I put all of this in a toolbar, it would be nice to be able to plug the designer not to a form but on a TWinControl (a panel for instance), so all the control outside this panel will be excluded from the designer.
Another way is to be able to exclude a Rect area (in the case the toolbar bounding rect).

Best regards

Armindo

1 Like