Error Messages

While developing with the Layout Manager, you may encounter certain error messages when the .r layout syntax is incorrect. These error messages will appear in the "Messages" window while running the product. There is no specific syntax checking for layout manager syntax in the resource compiler. Below is a list of these error messages, along with the instructions for resolving the issue.

Error Message Problem Resolution Instructions
Parent item for layout instructions is unknown Layout resource items are only valid in a DialogBoxRsc, DialogItemListRsc or CmdItemListRsc.
No previous layout item found to add this child layout to The layout interpreter encountered a "child" layout but a parent layout was not found. Make sure each "Begin Layout" is properly paired with an "End Layout".
Item cannot be outside a layout item A dialog item was encountered outside a "Begin" and "End" layout block. Once a Dialog is using the Layout Manager, all items must be in a layout. PopupMenu items are the only exception to this rule.
The grid row number is invalid. Using 0. The current row number is less than 0. The default row is 0. Make sure the row='n' syntax is correct or that the GridRow and EndRow items are paired correctly.
The grid column number is invalid. Using 0. The current column number is less than 0. The default column is 0. Make sure the column='n' syntax is correct.
Encountered a GridRow outside a GridLayout The GridRow item may only be located inside a GridLayout / EndLayout block.
Encountered an EndLayout without a matching "Begin" layout item The EndLayout item must be matched with a "Begin" layout item. Make sure each "Begin Layout" is properly paired with an "End Layout".
Spacing item cannot be used in this layout The Spacing item is only supported in a FlowLayout or StackLayout.
Stretch item cannot be used in this layout The Stretch item is only supported in a StackLayout.
The dialog has no active Layout Manager. Check the layout syntax for the dialog. Either layout syntax was encountered for the dialog or the C++ API was used to set the GuiLayoutHelper for the dialog. But there is no LayoutManager associated with the dialog. Make sure each "Begin Layout" is properly paired with an "End Layout".
Invalid DockPosition encountered. Valid values are DOCK_TOP, DOCK_BOTTOM, DOCK_LEFT, DOCK_RIGHT and DOCK_FILL. EXTINTATTR_DOCK_POSITION and SetDockPosition () only accepts the Top, Bottom, Left, Right and Fill values.
Invalid margin= value encountered. The value should have one, two or four entries. See an explanation of the margin= syntax in the marginOverride.
Invalid integer value override encountered. Several auxInfo override values should be integer values only. Make sure there are no alpha characters included.
Invalid dockPosition= value encountered. Valid values are 'top', 'bottom', 'left', 'right' and 'fill'. The dockPosition= auxInfo override value only accepts the Top, Bottom, Left, Right and Fill values.
Invalid sizePolicy= value encountered. Valid values are 'minimum', 'maximum', 'preferred', 'minimumexpanding', 'expanding' and 'ignored'. See an explanation of the sizePolicy= syntax in the sizePolicyOverride
Invalid sizePolicy= value encountered. The value should have two entries for horizontal and vertical. See an explanation of the sizePolicy= syntax in the sizePolicyOverride
Invalid horizontalAlignment= value encountered. Valid values are 'left', 'center', 'right' and 'stretch'. See an explanation of the horizontalAlignment= syntax in the HorizontalAlignment
Invalid verticalAlignment= value encountered. Valid values are 'top', 'center', 'bottom' and 'stretch'. See an explanation of the verticalAlignment= syntax in the VerticalAlignment
The 'Star' syntax for colSpan= cannot be used for this column because the column number is too large. The column= value is too large for the GridLayout. Check the column= and colSpan= values and also the GridLayoutRsc definition for column information. See an explanation of the colSpan= syntax in the colSpanOverride
The 'Star' syntax for colSpan= only works if you've defined Columns in the GridLayout resource. Make sure the specified GridLayout has an associated GridLayoutRsc definition with column information. See an explanation of the colSpan= syntax in the colSpanOverride

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.