lnbValue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (return)
(syntax & example)
Line 12: Line 12:
| [[lnbValue]] [idc([[Number]]),[row([[Number]]),column([[Number]])] |= Syntax
| [[lnbValue]] [idc([[Number]]),[row([[Number]]),column([[Number]])] |= Syntax


|p1= [idc([[Number]]),[row([[Number]]),column([[Number]])]: [[Array]] |= PARAMETER1  
|p1= [idc([[Number]]),[row([[Number]]),column([[Number]])]: [[Array]] |= PARAMETER1


|p2= |= PARAMETER2
| [[Number]] |= RETURNVALUE
 
____________________________________________________________________________________________


|p3= |= PARAMETER3
| s2= [[lnbValue]] [ [[Control]],[row([[Number]]),column([[Number]])] ] |= Syntax


| [[Number]] |= RETURNVALUE
| p21= [ [[Control]],[row([[Number]]),column([[Number]])] ]: [[Array]]  |= Parameter 1


| r2= [[Number]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


| s2= [[lnbValue]] [ [[Control]],[row([[Number]]),column([[Number]])] |= Syntax
| s3= _ctrl [[lnbValue]] [row([[Number]]),column([[Number]])] |= Syntax


| p21= [ [[Control]],[row([[Number]]),column([[Number]])]: [[Array]]  |= Parameter 1  
| p41= _ctrl: [[Control]]  |= Parameter 1  


| r2= [[Number]] |= Return value  
| p42= [row([[Number]]),column([[Number]])]: [[Array]]  |= Parameter 2
 
| r3= [[Number]] |= Return value  
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>{{Example needed}}</code>|= Example 1
|x1= <code>_ctrl [[lnbValue]] [0,0];</code>|= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 08:28, 9 September 2014

Hover & click on the images for description

Description

Description:
Returns the additional integer value in the item with the given position of the 2D listbox.
Groups:
Uncategorised

Syntax 1

Syntax:
lnbValue [idc(Number),[row(Number),column(Number)]
Parameters:
[idc(Number),[row(Number),column(Number)]: Array
Return Value:
Number

Syntax 2

Syntax:
lnbValue [ Control,[row(Number),column(Number)] ]
Parameters:
[ Control,[row(Number),column(Number)] ]: Array
Return Value:
Number

Syntax 3

Syntax:
_ctrl lnbValue [row(Number),column(Number)]
Parameters:
_ctrl: Control
[row(Number),column(Number)]: Array
Return Value:
Number

Examples

Example 1:
_ctrl lnbValue [0,0];

Additional Information

See also:
lnbAddArraylnbAddColumnlnbAddRowlnbClearlnbColorlnbCurSelRowlnbDatalnbDeleteColumnlnbDeleteRowlnbGetColumnsPositionlnbPicturelnbSetColorlnbSetColumnsPoslnbSetCurSelRowlnbSetDatalnbSetPicturelnbSetTextlnbSetValuelnbSizelnbText

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

It seems this command is don't have arma-style syntax (not work with control type). However, you can use the lbValue. Example (in the case of the 3 columns in the row):
_rowSize = count getArray(
    missionConfigFile >> "RscMyDlg" >> "controls" >> "MyList" >> "columns"
);
_row = 12;
_column = 2;
_verificationValue = 9781;
_ctrlMyList lnbSetValue [[_row, _column], _verificationValue];
_value = _ctrlMyList lbValue (_row * _rowSize + _column);

hint str (_verificationValue == _value); // hint true

While this bug is not fixed, we can use the macro:

#define __lnbRowSize(lnb) ((lnbSize lnb) select 1)
#define __lnbValue(lnb, row, col) ((lnb) lbValue ((row) * __lnbRowSize(lnb) + (col)))

__lnbValue(_ctrlMyList, _row, _column);

DenV

Bottom Section