Simple List widget event message

While documentation shows the properties of a simple list widget it does not mention any messages. I am trying to use the simpleList widget as a clickable list. (The hoverColor makes this appear as if it was intended for such a purpose.) Unfortunately, I have been unable to discover what “clickMessage” is passed to the widget that might help me deduce the clicked row. I am using LC Create in Classic mode.

Hi Scott,

I used the simple list field to manage the click, it is gleaned from a workflow

/* This code was generated from the selectListField workflow. */

on mouseUp pButton, pEvent
put pEvent[“row”] into tRow
put the content of me into tMyContent
put tMyContent[tRow][“title”] into tText
set the text of widget “testField” to tText
set the text of widget “MyInputField” to tText
end mouseUp

And yes I agree that messages are sadly lacking from documentation

Kind regards
Bernd

Thank you Bernd! I nearly had it but nearly wasn’t enough. I am using Create in the “Classic” environment and when I switched to the new “Create” environment and tried to get it to write the script for me so I could understand what I was missing… I couldn’t quite figure out how to look. Eventually, I will become more proficient. I appreciate your generous helping hand.
Warmest regards
Scott

Thank you Scott,

but the worst part for the documentation is that messages are not only lacking in the documentation but also from what the widget provides for the documentation in a file “api.lcdoc”
That file is the the automatically created documentation for the dictionary etc. if and when the author cares to document e.g. messages in the widget script itself.
Only properties are documented. The author could have easily added documentation for “messages”.

I post it here for LC to see where a problem with the widget documentation might come from.

Taken from “api.lcdoc” for “com.livecode.widget.simplelist” from the bundle of “LiveCode Create 1.0 (DP 7).app”:

Library: com.livecode.widget.simplelist

Type: Widget

Title: Simple list
Author: Williams del Rey
Version: 1.0.0
SVGIcon: M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 1 0 112 0 56 56 0 1 0-112 0zm0 284a56 56 0 1 0 112 0 56 56 0 1 0-112 0zm0 284a56 56 0 1 0 112 0 56 56 0 1 0-112 0z
PreferredSize: 400,300
Description: Basic list
Requires: com.livecode.widget.list

Name: titleHoverColor
Type: property
Syntax: set the titleHoverColor of to
Syntax: get the titleHoverColor of
Summary: The color of the title when hovered.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the title item when
the mouse is hovering.

Name: leftSection
Type: property
Syntax: set the leftSection of to leftSection
Syntax: get the leftSection of
Summary: The left section content type and visibility.
Value(enum): - “None”: No left section.

  • “Icon”: Icon content type
    Description:
    Use the property to indicate if a list section should be present
    on the list and the kind of content it should contain.

Name: rightSectionDefault
Type: property
Syntax: set the rightSectionDefault of to rightSectionDefault
Syntax: get the rightSectionDefault of
Summary: The default of the right section of the list.
Description:
Use the property to define the value the right section will
have when no content is defined.

Name: leftSectionColor
Type: property
Syntax: set the leftSectionColor of to
Syntax: get the leftSectionColor of
Summary: The color of the left section.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the left section.

Name: rightSection
Type: property
Syntax: set the rightSection of to rightSection
Syntax: get the rightSection of
Summary: The right section content type and visibility.
Value(enum): - “None”: No right section.

  • “Icon”: Icon content type
    Description:
    Use the property to indicate if a list section should be present
    on the list and the kind of content it should contain.

Name: content
Type: property
Syntax: set the content of to content
Syntax: get the content of
Summary: The content of the list.
Value(String): A line delimited list, each element of the items delimited by a tab
Description: Use the property to define the content of the list.

Name: leftSectionHoverColor
Type: property
Syntax: set the leftSectionHoverColor of to
Syntax: get the leftSectionHoverColor of
Summary: The color of the left section when hovered.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the left section when
the mouse is hovering.

Name: titleHiliteColor
Type: property
Syntax: set the titleHiliteColor of to
Syntax: get the titleHiliteColor of
Summary: The color of the title when hilited.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the title item when
hilited.

Name: rightSectionHiliteColor
Type: property
Syntax: set the rightSectionHiliteColor of to
Syntax: get the rightSectionHiliteColor of
Summary: The color of the right section when hilited.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the right
section when hilited.

Name: rightSectionDefaultIcon
Type: property
Syntax: set the rightSectionDefaultIcon of to rightSectionDefaultIcon
Syntax: get the rightSectionDefaultIcon of
Summary: The icon of the right section of the list when is “icon”
Description:
Use the property to define the icon the right section
icon will show.

Name: showSubTitle
Type: property
Syntax: set the showSubTitle of to {true | false}
Syntax: get the showSubTitle of
Summary: The character counter of the field widget
Value: the showSubTitle of the text control
Description:
Use the property to show or hide the text control character
counter.

Name: leftSectionSize
Type: property
Syntax: set the leftSectionSize of to leftSectionSize
Syntax: get the leftSectionSize of
Summary: The left section content size.
Description:
Use the property to indicate the size of the content to show
in the left section of the list.

Name: divider
Type: property
Syntax: set the divider of to divider
Syntax: get the divider of
Summary: The divider type.
Value(enum): - “None”: No divider.

  • “Inset”: The divider will start at the same left of the text.
  • “Full”: The divider will take the whole width of the widget.
    Description:
    Use the property to define the behavior of the line dividing list
    elements.

Name: hiliteColor
Type: property
Syntax: set the hiliteColor of to
Syntax: get the hiliteColor of
Summary: The color of the hilite.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the hilite element.

Name: backgroundColor
Type: property
Syntax: set the backgroundColor of to
Syntax: get the backgroundColor of
Summary: The color of the widget’s background.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the button.

Name: subtitleTextSize
Type: property
Syntax: set the subtitleTextSize of to
Syntax: get the subtitleTextSize of
Summary: The text size of the subtitle section.
Description:
Use the property to define the text size of the secondary
text section.

Name: contentFilter
Type: property
Syntax: set the contentFilter of to contentFilter
Summary: The filter properties of the list.
Value(Array): ContentFilter[] =
{
“filterText”: ,
“filterMode”: (Values: “Contains”/“Exact Match”)
}
can take values “title”, “subtitle”, etc of the simpleList
Description: Nested array with properties used to filter the content of the list.

Name: titleTextSize
Type: property
Syntax: set the titleTextSize of to
Syntax: get the titleTextSize of
Summary: The text size of the title section.
Description: Use the property to define the text size of the title section.

Name: leftSectionHiliteColor
Type: property
Syntax: set the leftSectionHiliteColor of to
Syntax: get the leftSectionHiliteColor of
Summary: The color of the left section when hilited.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the left section
when hilited.

Name: subTitleColor
Type: property
Syntax: set the subTitleColor of to
Syntax: get the subTitleColor of
Summary: The color of the subtitle.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the subtitle item.

Name: themeData
Type: property
Syntax: set the themeData of to {}
Syntax: get the themeData of
Summary: The theme mappings of this widget
Description: Use the property to define the theme mappings.

Name: titleColor
Type: property
Syntax: set the titleColor of to
Syntax: get the titleColor of
Summary: The color of the title.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the title item.

Name: rightSectionColor
Type: property
Syntax: set the rightSectionColor of to
Syntax: get the rightSectionColor of
Summary: The color of the right section.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the right section.

Name: formattedHeight
Type: property
Syntax: get the formattedHeight of
Summary: The actual required height of the widget.
Value: Integer representing height
Description:
Use the property to get the required height of the widget
to properly display all content.

Name: leftSectionDefault
Type: property
Syntax: set the leftSectionDefault of to leftSectionDefault
Syntax: get the leftSectionDefault of
Summary: The default of the left section of the list.
Description:
Use the property to define the value the left section will
have when no content is defined.

Name: subTitleHiliteColor
Type: property
Syntax: set the subTitleHiliteColor of to
Syntax: get the subTitleHiliteColor of
Summary: The color of the subtitle when hilited.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the subtitle item
when hilited.

Name: subTitleHoverColor
Type: property
Syntax: set the subTitleHoverColor of to
Syntax: get the subTitleHoverColor of
Summary: The color of the subtitle when hover.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the subtitle item
when the mouse is hovering it.

Name: dividerColor
Type: property
Syntax: set the dividerColor of to
Syntax: get the dividerColor of
Summary: The color of divider line;
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the divider line.

Name: rightSectionHoverColor
Type: property
Syntax: set the rightSectionHoverColor of to
Syntax: get the rightSectionHoverColor of
Summary: The color of the right section when hover.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description:
Use the property to define the color of the right
section when the mouse is hovering.

Name: hoverColor
Type: property
Syntax: set the hoverColor of to
Syntax: get the hoverColor of
Summary: The color of the hover.
Value: Three comma-delimited integers between 0 and 255, specifying an RGB value
Description: Use the property to define the color of the hovered element.

Name: rightSectionSize
Type: property
Syntax: set the rightSectionSize of to rightSectionSize
Syntax: get the rightSectionSize of
Summary: The right section content size.
Description:
Use the property to indicate the size of the content to show
in the right section of the list.

Thank you for reporting this! I will let someone know about the documentation missing messages.