nmpButtonWidth (Function) |
Top Previous Next |
This function will set the width of a configurable button on the NMP. To prevent the buttons from jumping when updated, it is recommended to only change the width of multiple buttons when they all are invisible.
Input: id : INT The ID of the button - between 1 and the button count defined in nmpButtonsDefine.
weight : INT Determines the width of the button relative to the total weight of all the buttons. A button with weight 2 is twice as wide as a button with weight 1. If the total weight of the buttons is 4, a button with weight 2 will a width 50% of this.
max_width : INT (0..100) Determines the maximum width of the button as an integer between 1 and 100, where 100 is the entire width of the panel.To have no maximum value, use 0. This is used to prevent a button from becoming too wide when only a few buttons are defined by limiting the width to e.g. 50 % of the total width.
Returns: INT
Declaration: FUNCTION nmpButtonWidth : INT;
Example: INCLUDE rtcu.inc |