Dropdowns allows the Method User to choose from a unique list of options.
The options a user can choose from a dropdown are records stored in a table. When using a dropdown control, it will need to be attached to an existing table with unique record options.
When you create a dropdown field in a table, Method will create the table for you pre-filled with the options entered.
Caption: The text label used for the dropdown and also identifies the dropdown within actions.
Hide Caption: If you’re just labeling your control for your own information but don’t want the text to show in the live screen, check this box.
Load State: The default state of the control (regular/hidden/disabled).
Base Table: As mentioned above, the dropdown needs to pull its options from a table and this is selected here. In our example, the base table is the Contacts table.
Include Clear Option on mobile: Give the user the option to clear the selection when viewing on a mobile device.
Placeholder: Reminder text.E.g. “Select a country...”
Default Text: This is the default choice for the dropdown.
Width: How wide should your control be in relation to the screen?
- Auto: object will be the width of the text and/or icon
- Fixed: assign the width of the object in pixels
- Full: object will be full width of the section or cell it has been dragged into
Custom Row Text: Initially, this is not viewable. However, when you add an action in the dropdown's Custom Row Click event, this option appears. This allows you to place a link in the first row of the dropdown. If you take a look at the example above, you will see ⊕ New Contact blue link within the first row of the dropdown.
Selecting Columns opens the Columns Properties Window as shown in the below image. This allows you to choose which fields from the associated table are shown in the dropdown menu for each menu item.
In the below example, the dropdown on the left had one field added to its column properties: the Name field. In the dropdown on the right, two fields have been added: Name and Company.
It also gives you the ability to customize how many columns are displayed in your dropdown (by default there is only one) and to format those columns based on a variety of criteria including width and how the data is displayed.
Filters & Views
This option opens a new screen that allows you to edit the Sorting and Criteria for displaying information for each menu item in the dropdown. It is similar to setting up the views for grids.
As with most input controls, you can create validation rules to make sure a user has entered in the correct information. For more information, please see our article "Field Validation."
Text Color: Set the color of the text in your control.
Background Color: Set the background color of this control from the preset Method palette.
Caption color/size/text alignment/font weight: Choose the color, size, alignment, and font weight of the text in your caption.
Actions / Events
The dropdown object has four events associated with it.
Change Event - Triggered when the user changes the selected value in the dropdown.
Focus Event - Triggered when the user moves the mouse cursor into the dropdown field.
Lose Focus - Triggered when the user moves the cursor away from the dropdown field.
Custom Row Click - Triggered when the user clicks the custom row.