Show/Hide Detail button

The Show/Hide Detail button toggles the lookup’s scrolling window between normal and expanded mode.

[spacer]

When the scrolling window is displaying details, the items shown in normal mode are displayed in bold text. The additional items are shown in plain text. If they require additional explanation, the additional items can have prompts. These prompts are also displayed in plain text.

[spacer]

Adding a Show/Hide Details button

To add a show/hide details button to a lookup window, use the following procedure.

  1. Create the show/hide details field.

Create a local field named ‘ShrinkExpandSwitch’ for your lookup form. This local field has the following characteristics:

[spacer]

Field Name

ShrinkExpandSwitch

Control Type

Visual Switch

Static Type

Picture


Use the images named SW_ShowSummary_PB_Up and SW_ShowDetail_PB_Up from the Dynamics.dic dictionary as the two pictures for the visual switch.

  1. Add the show/hide details field.

Drag the local field onto the lookup window layout. Set the following Object properties for the field:

[spacer]

TabStop

False

Tooltip

Show Details


Set the following Visual properties for the field:

[spacer]

Appearance

3D Highlight

BackColor

Transparent

Border

False


  1. Attach a change script.

Attach a change script to the field, similar to the following example. This script sets the mode of the scrolling window in the lookup. It also dynamically changes the style of the text displayed in the lookup window, based on whether details are being shown.

local boolean result;

if '(L) ShrinkExpandSwitch' = 1 then
	{Make the first line of fields in the scrolling window plain.}
	result = Field_SetFontStyle('Lead ID' of window Lead_Lookup_Scroll, FONT_STYLE_PLAIN);
	result = Field_SetFontStyle('Lead Name' of window Lead_Lookup_Scroll, FONT_STYLE_PLAIN);
	result = Field_SetFontStyle('Salesperson ID' of window Lead_Lookup_Scroll, FONT_STYLE_PLAIN);

	{Shrink the scrolling window.}
	expand window Lead_Lookup_Scroll, false;

	{Set the tooltip for the button.}
	result = Field_SetToolTip('(L) ShrinkExpandSwitch', "Show Details");
else
	{Make the first line of fields in the scrolling window bold.}
	result = Field_SetFontStyle('Lead ID' of window Lead_Lookup_Scroll, FONT_STYLE_BOLD);
	result = Field_SetFontStyle('Lead Name' of window Lead_Lookup_Scroll, FONT_STYLE_BOLD);
	result = Field_SetFontStyle('Salesperson ID' of window Lead_Lookup_Scroll, FONT_STYLE_BOLD);

	{Expand the scrolling window.}
	expand window Lead_Lookup_Scroll, true;

	{Set the tooltip for the button.}
	result = Field_SetToolTip('(L) ShrinkExpandSwitch', "Hide Details");
end if;


Documentation Feedback