Class MultiButtonEntry
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
It inherits Layout. The MultiButtonEntry is a widget, that lets a user enter text and each chunk of the text managed as a set of buttons. Each text button is inserted by pressing the "return" key. If there is no space in the current row, a new button is added to the next row. When a text button is pressed, it will become focused. Backspace removes the focus. When the multi-button entry loses focus, items longer than one line are shrunk to one line. The typical use case of multi-button entry is composing emails/messages to a group of addresses, each of which is an item that can be clicked for further actions.
public class MultiButtonEntry : Layout, IAccessibleObject
- Inheritance
- Implements
Constructors
View SourceMultiButtonEntry(EvasObject)
Creates and initializes a new instance of the MultiButtonEntry class.
Declaration
public MultiButtonEntry(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | The parent is a given container, which will be attached by the MultiButtonEntry as a child. It's EvasObject type. |
API Level: preview
Properties
View SourceEntry
Gets the entry object int the MultiButtonEntry.
Declaration
public Entry Entry { get; }
Property Value
Type | Description |
---|---|
Entry |
API Level: preview
View SourceFirstItem
Gets the first item in the MultiButtonEntry.
Declaration
public MultiButtonEntryItem FirstItem { get; }
Property Value
Type | Description |
---|---|
MultiButtonEntryItem |
API Level: preview
View SourceIsEditable
Gets or sets whether the MultiButtonEntry is editable or not.
Declaration
public bool IsEditable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
View SourceIsExpanded
Gets or sets the MultiButtonEntry to expanded state. If true, expanded state. If false, single line state.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
View SourceLastItem
Gets the last item in the MultiButtonEntry.
Declaration
public MultiButtonEntryItem LastItem { get; }
Property Value
Type | Description |
---|---|
MultiButtonEntryItem |
API Level: preview
View SourceSelectedItem
Gets the selected item in the MultiButtonEntry.
Declaration
public MultiButtonEntryItem SelectedItem { get; }
Property Value
Type | Description |
---|---|
MultiButtonEntryItem |
API Level: preview
Methods
View SourceAppend(String)
Appends a new item to the multibuttonentry.
Declaration
public MultiButtonEntryItem Append(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label | The label of the new item. |
Returns
Type | Description |
---|---|
MultiButtonEntryItem | A MultiButtonEntryItem to the item added. |
API Level: preview
View SourceAppendFilter(Func<String, Boolean>)
Appends an item filter function for the text inserted in the multibuttonentry.
Declaration
public void AppendFilter(Func<string, bool> func)
Parameters
Type | Name | Description |
---|---|---|
Func<String, Boolean> | func | The function to use as item filter. |
API Level: preview
View SourceClear()
Removes all items in the MultiButtonEntry.
Declaration
public void Clear()
API Level: preview
View SourceCreateHandle(EvasObject)
Creates a widget handle.
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
IntPtr | Handle IntPtr. |
Overrides
API Level: preview
View SourceInsertAfter(MultiButtonEntryItem, String)
Adds a new item to the MultiButtonEntry after the indicated object.
Declaration
public MultiButtonEntryItem InsertAfter(MultiButtonEntryItem after, string label)
Parameters
Type | Name | Description |
---|---|---|
MultiButtonEntryItem | after | The item after which to add it. |
String | label | The label of new item. |
Returns
Type | Description |
---|---|
MultiButtonEntryItem | A MultiButtonEntryItem to the item added. |
API Level: preview
View SourceInsertBefore(MultiButtonEntryItem, String)
Adds a new item to the MultiButtonEntry before the indicated object reference.
Declaration
public MultiButtonEntryItem InsertBefore(MultiButtonEntryItem before, string label)
Parameters
Type | Name | Description |
---|---|---|
MultiButtonEntryItem | before | The item before which to add it. |
String | label | The label of new item. |
Returns
Type | Description |
---|---|
MultiButtonEntryItem | A MultiButtonEntryItem to the item added. |
API Level: preview
View SourcePrepend(String)
Prepends a new item to the MultiButtonEntry.
Declaration
public MultiButtonEntryItem Prepend(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label | The label of the new item. |
Returns
Type | Description |
---|---|
MultiButtonEntryItem | A MultiButtonEntryItem to the item added. |
API Level: preview
View SourcePrependFilter(Func<String, Boolean>)
Prepends a filter function for the text inserted in the MultiButtonEntry.
Declaration
public void PrependFilter(Func<string, bool> func)
Parameters
Type | Name | Description |
---|---|---|
Func<String, Boolean> | func | The function to use as text filter. |
API Level: preview
View SourceRemoveFilter(Func<String, Boolean>)
Removes a filter from the list.
Declaration
public void RemoveFilter(Func<string, bool> func)
Parameters
Type | Name | Description |
---|---|---|
Func<String, Boolean> | func | The filter function to remove. |
API Level: preview
View SourceSetFormatCallback(Func<Int32, String>)
Sets a function to format the string that will be used to display the hidden items counter. If func is NULL, the default format will be used, which is "+ 'the hidden items counter'".
Declaration
public void SetFormatCallback(Func<int, string> func)
Parameters
Type | Name | Description |
---|---|---|
Func<Int32, String> | func | The function to return string to show. |
API Level: preview
Events
View SourceClicked
Clicked is raised when a MultiButtonEntry is clicked.
Declaration
public event EventHandler Clicked
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceContracted
Contracted is raised when a MultiButtonEntry is contracted.
Declaration
public event EventHandler Contracted
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceExpanded
Expanded is raised when a MultiButtonEntry is expanded.
Declaration
public event EventHandler Expanded
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceExpandedStateChanged
ExpandedStateChanged is raised when shrink mode state of MultiButtonEntry is changed.
Declaration
public event EventHandler ExpandedStateChanged
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceItemAdded
ItemAdded is raised when a new MultiButtonEntry item is added.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemAdded
Event Type
Type | Description |
---|---|
EventHandler<MultiButtonEntryItemEventArgs> |
API Level: preview
View SourceItemClicked
ItemClicked is raised when an item is clicked by user interaction.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemClicked
Event Type
Type | Description |
---|---|
EventHandler<MultiButtonEntryItemEventArgs> |
API Level: preview
View SourceItemDeleted
ItemDeleted is raised when a MultiButtonEntry item is deleted.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemDeleted
Event Type
Type | Description |
---|---|
EventHandler<MultiButtonEntryItemEventArgs> |
API Level: preview
View SourceItemLongPressed
ItemLongPressed is raised when MultiButtonEntry item is pressed for a long time.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemLongPressed
Event Type
Type | Description |
---|---|
EventHandler<MultiButtonEntryItemEventArgs> |
API Level: preview
View SourceItemSelected
ItemSelected is raised when an item is selected by API, user interaction, and etc. This is also raised when a user presses backspace, while the cursor is on the first field of the entry.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemSelected
Event Type
Type | Description |
---|---|
EventHandler<MultiButtonEntryItemEventArgs> |