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
value
stringa 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
color
stringThe main color parameter. Can contain two values, comma separated.
noParamOrder
NoParamOrderbackground
stringBackground color - will only take effect if the
color
was not set.foreground
stringForeground color - will only take effect if the
color
was not set.
Returns
Filter(object)
Add filter information to the button - usually when opening Data dialogs.
ITweakButton Filter(object value)
Parameters
value
objectA string such as
name=value
or 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
name
stringThe name/key which comes before the
=
value
objectThe 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
value
objectA string such as
name=value
or 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
name
stringThe name/key which comes before the
=
value
objectThe 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
value
stringthe group name
Returns
Icon(string)
Set the icon for this button.
ITweakButton Icon(string value)
Parameters
value
stringOne 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
note
stringThe note/message
noParamOrder
NoParamOrdertype
stringOptional type, like
info
(default),warning
,help
background
stringBackground color.
delay
intDelay show by this duration in ms. If mouse leaves before, it won't appear (new v17).
linger
intLinger by this duration in ms after the mouse leaves - new v17.
format
stringhtml
ortext
(default) - new v17
Returns
Remarks
- Added in v15.07
delay
andlinger
added in v17format
added 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
value
objectA string such as
name=value
or 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
name
stringThe name/key which comes before the
=
value
objectThe 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
value
int
Returns
Prefill(object)
Add prefill information to the button, usually for creating new Entities.
ITweakButton Prefill(object value)
Parameters
value
objectA string such as
name=value
or 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
name
stringThe name/key which comes before the
=
value
objectThe value which comes after the
=
Returns
Show(bool)
Set the show of this button.
ITweakButton Show(bool show = true)
Parameters
show
boolOptional show value, default is
true
Returns
Tooltip(string)
Set the title / Tooltip of the button.
ITweakButton Tooltip(string value)
Parameters
value
stringThe 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
value
objecta string such as
this=that
or 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
name
stringThe name/key which comes before the
=
value
objectThe value which comes after the
=