_CTWARN Control Warnings Report

Top  Previous  Next


Targets: All except BP7


This report presents several lists, helping you spot possible errors in your form files.



Controls that overlap visually (COWA1)


This is a list of controls that overlap each other visually, possibly hiding each other.



Labels with Caption-property that does not end in ":" (COWA2)


Labels (TLabels) above or to the left of other controls usually end their caption with the char “:”. This lists all labels that not confirm to this. Of course, this does not apply to labels that are standalone and just used for display purposes. PAL cannot know the purpose of a label and reports all labels with missing “:”.


A false warning is generated for captions that are so long that they span over more than one line in the DFM file.



Conflicting accelerators (COWA3)


This is a list of all controls with conflicting accelerators in the Caption property. Some types of controls are not reported even if they share the same accelerators, because they do not conflict. Those are menu items on different sub menus, and controls that reside on different TTabSheet pages of a TPageControl control.


Labels (or static texts) that have accelerators but FocusControl is not set (COWA4)


Labels and static texts cannot receive focus. When an accelerator key is pressed, focus is given to the control specified by the FocusControl property. It is an error to omit the FocusControl property in this case.



Conflicting shortcuts (COWA5)


This is a list of all menu items with conflicting shortcuts (key combination) (property ShortCut).



Buttons/menu items with OnClick-event that is unassigned (COWA6)


This is a list of all buttons and menu items with an unassigned OnClick-event. Normally there should be an action on OnClick for these controls, so it indicates an error in the code. Warnings are not created when the property Action is set. Buttons with ModalResult set will be excluded from the list.




Menu items that have HelpContext=0 (COWA7)

This is a list of all menu items with a HelpContext property value of 0. Probably the menu item has not been assigned a topic in the help file. Failing to assign a topic could trigger this messagebox when the help system is invoked:



You can also use the Missing Property Report to generate this information. Add a “TMenuItem;HelpContext” item to the check list.




Hint is not activated (COWA8)

This is a list of all controls where the Hint property is set, and both ShowHint and ParentShowHint properties are “false”.




See also:


R_CONTR Control Reports