VS:SetLBItemUsingColumnDataItem: Difference between revisions
Jump to navigation
Jump to search
m (fix text) |
m (Transfer Orso to _c_) |
||
Line 52: | Line 52: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark> | <remark> | ||
([[User: | ([[User:CBM-c-|_c_]], 2015.04.06): this crashes VW 2013 if the cell doesn't have any column data items. Check for the presence of data items in the chosen column using [[VS:GetNumLBColumnDataItems|GetNumLBColumnDataItems]] in order to prevent accidentally using it on cells with no column data items: | ||
<code lang="vs"> | <code lang="vs"> | ||
IF GetNumLBColumnDataItems(dialogID, listBrowserID, columnIndex) > 0 THEN BEGIN | IF GetNumLBColumnDataItems(dialogID, listBrowserID, columnIndex) > 0 THEN BEGIN |
Latest revision as of 05:57, 30 December 2020
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Sets list item data with specified column data item.
FUNCTION SetLBItemUsingColumnDataItem(
dialogID :LONGINT;
componentID :LONGINT;
itemIndex :INTEGER;
subItemIndex :INTEGER;
columnDataItemIndex :INTEGER) : BOOLEAN;
def vs.SetLBItemUsingColumnDataItem(dialogID, componentID, itemIndex, subItemIndex, columnDataItemIndex): return BOOLEAN
Parameters
dialogID LONGINT id of the dialog that contains the list browser componentID LONGINT id of the list browser control itemIndex INTEGER the row index subItemIndex INTEGER the column index columnDataItemIndex INTEGER the column data item with which to set list item data
Remarks
(_c_, 2015.04.06): this crashes VW 2013 if the cell doesn't have any column data items. Check for the presence of data items in the chosen column using GetNumLBColumnDataItems in order to prevent accidentally using it on cells with no column data items:
IF GetNumLBColumnDataItems(dialogID, listBrowserID, columnIndex) > 0 THEN BEGIN IF SetLBItemUsingColumnDataItem(dialogID, listBrowserID, rowIndex, columnIndex, columnDataItemIndex) THEN BEGIN { ... } END; END;
Version
Availability: from VectorWorks 11.0