Skip to content

stam66/skComboBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

skCombobox - a better comboBox for LiveCode

A LiveCode group control for an enhanced combobox control

Current version: 0.96.4 (changelog)

Features

  • Placeholder text function to help guide user input
  • Search as you type to highlight a value in the popup
  • Show/hide popup list with the return or escape keys
  • Arrow key navigation of popup list
  • Select a value in the popup list with the return or enter keys (or click on value)
  • Get/Set the textContent, listContent, placeholderText. Properteis with getters/setters listed below
  • On setting text content, a "comboAction" message is emitted to pass the long id of the group and its text
  • Reiszing when collapsed resizes with of the widget and the height of the field (not restricted to default/OS height)
  • Resizing when expanded resizes the width of the widgt and the height of the dropdown. Dropdown will remain visible when switching to pointer tool if the mouse within the rect of the group or if optionKey is down.

Usage

Stack intended as plugin. Drag & drop or double-click to place on a topLevel stack.
Selecting a placed group allows editing of properties in the plugin/controller stack.

skComboBox Controller when no selection When an skComboBox is selected
skComboBox Screenshot 2024-03-31 at 11 11 14 Screenshot 2024-03-31 at 11 11 21

API

Public handlers

  • resetProps: Command to reset all properties to default values

Messages

  • comboAction pID, pText: emitted when setting the textContent - can be handled further up the message path (eg parent, card or stack) and passes the long id of the group and the textContent of the group.

Text content properties

  • textContent: get/set the text typed or selected (string)
  • listContent: get/set the text displayed in the drop-down (return-delimited list)
  • placeholderText: get/set the placeholder/default (text; default: “Type or Select…”)

Text appearance properties

  • placeholderColor: get/set the textColor of placeholder text (color; default: 180,180,180)
  • placeholderStyle: get/set the textStyle of the placeholder text (enum; default: italic)
  • normalColor: get/set the textColor of user-entered text (color; default: 66,66,66)
  • normalStyle: get/set the textStyle of user-entered text (enum; default: Plain)
  • fieldTextSize: get/set textSize of entry field; the dropdown size is 1 point smaller (default: 13 points)

Group properties properties

  • groupColor: get/set the backgroundColor of the field/dropdown (Color; default: 255,255,255)
  • groupHiliteColor: get/set the hilite colours for field and dropdown selections (Color; default: 173,204,250)

About

LiveCode combobox alternative

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages