Interface ITweakButton
Experimental new API in v15.07 to improve how to configure the Ui of a button.
Tip
Read more about this in Toolbar Builder Guide – Tweak API for Buttons new 15.07
[PublicApi]
public interface ITweakButton
Remarks
Added in v15.07
Methods
Classes(string)
Set one or more classes on the button.
ITweakButton Classes(string value)
Parameters
valuestringa string containing one or more CSS class names
Returns
Color(string, NoParamOrder, string, string)
Set the color of this button.
A color can be red, green or #FFCC66 as well as transparent colors such as #FFCC6699
ITweakButton Color(string color = null, NoParamOrder noParamOrder = default, string background = null, string foreground = null)
Parameters
colorstringThe main color parameter. Can contain two values, comma separated.
noParamOrderNoParamOrderbackgroundstringBackground color - will only take effect if the
colorwas not set.foregroundstringForeground color - will only take effect if the
colorwas not set.
Returns
Filter(object)
Add filter information to the button - usually when opening Data dialogs.
ITweakButton Filter(object value)
Parameters
valueobjectA string such as
name=valueor an anonymous object such asnew { name = 27 }
Returns
Filter(string, object)
Add filter information to the button - usually when opening Data dialogs.
ITweakButton Filter(string name, object value)
Parameters
namestringThe name/key which comes before the
=valueobjectThe value which comes after the
=
Returns
FormParameters(object)
Add form-parameters to the button - which are available in the data.parameters in formulas.
ITweakButton FormParameters(object value)
Parameters
valueobjectA string such as
name=valueor an anonymous object such asnew { name = 27 }
Returns
Remarks
Added in 16.02
FormParameters(string, object)
Add form-parameters to the button - which are available in the data.parameters in formulas.
ITweakButton FormParameters(string name, object value)
Parameters
namestringThe name/key which comes before the
=valueobjectThe value which comes after the
=
Returns
Remarks
Added in 16.02
Group(string)
Set what group the button is in. This is rarely used.
ITweakButton Group(string value)
Parameters
valuestringthe group name
Returns
Icon(string)
Set the icon for this button.
ITweakButton Icon(string value)
Parameters
valuestringOne of a few predefined names, or a SVG string.
Returns
Note(string, NoParamOrder, string, string, int, int, string)
Add a floating note to the button.
ITweakButton Note(string note = null, NoParamOrder noParamOrder = default, string type = null, string background = null, int delay = 0, int linger = 0, string format = null)
Parameters
notestringThe note/message
noParamOrderNoParamOrdertypestringOptional type, like
info(default),warning,helpbackgroundstringBackground color.
delayintDelay show by this duration in ms. If mouse leaves before, it won't appear (new v17).
lingerintLinger by this duration in ms after the mouse leaves - new v17.
formatstringhtmlortext(default) - new v17
Returns
Remarks
- Added in v15.07
delayandlingeradded in v17formatadded in v17
Parameters(object)
Add parameters to the button - which are usually used when executing the command.
Tip
These parameters are used in the page itself and not forwarded to the form. Use FormParameters(object) for that purpose.
ITweakButton Parameters(object value)
Parameters
valueobjectA string such as
name=valueor an anonymous object such asnew { name = 27 }
Returns
Parameters(string, object)
Add parameters to the button - which are usually used when executing the command.
Tip
These parameters are used in the page itself and not forwarded to the form. Use FormParameters(object) for that purpose.
ITweakButton Parameters(string name, object value)
Parameters
namestringThe name/key which comes before the
=valueobjectThe value which comes after the
=
Returns
Position(int)
Specify the position of the button.
0 means in the very front, 1 is right after the first button, etc.
-1 means the last button, -2 is the second last, etc.
ITweakButton Position(int value)
Parameters
valueint
Returns
Prefill(object)
Add prefill information to the button, usually for creating new Entities.
ITweakButton Prefill(object value)
Parameters
valueobjectA string such as
name=valueor an anonymous object such asnew { name = 27 }
Returns
Prefill(string, object)
Add prefill information to the button, usually for creating new Entities.
ITweakButton Prefill(string name, object value)
Parameters
namestringThe name/key which comes before the
=valueobjectThe value which comes after the
=
Returns
Show(bool)
Set the show of this button.
ITweakButton Show(bool show = true)
Parameters
showboolOptional show value, default is
true
Returns
Tooltip(string)
Set the title / Tooltip of the button.
ITweakButton Tooltip(string value)
Parameters
valuestringThe title/tooltip to show
Returns
Ui(object)
Add a general ui-rule for things which are not in the standard API.
ITweakButton Ui(object value)
Parameters
valueobjecta string such as
this=thator an object which will be parsed/serialized such asnew { this = 27 }
Returns
Ui(string, object)
Add a general UI rule for things which are not in the standard API.
ITweakButton Ui(string name, object value)
Parameters
namestringThe name/key which comes before the
=valueobjectThe value which comes after the
=