Difference between revisions of "VS:SetLBItemUsingColumnDataItem"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(add comment about bug for obsolete VW 2013 leading to crash)
Line 49: Line 49:
 
</lineList>
 
</lineList>
 
</params>
 
</params>
 +
 +
-----------------------------------------------------------------------------------------------------------
 +
<remark>
 +
([[User:Orso.b.schmid|Orso]], 2015.04.06): this crashes VW 2013 if the cell doesn't have any column data items. Use a call to [[Dialogs - Modern - Browser|VS:GetNumLBColumnDataItems|GetNumLBColumnDataItems]] in order to prevent accidentally using it on cells with no column data items:
 +
<code lang="vs">
 +
IF GetNumLBColumnDataItems(dialogID, listBrowserID, columnIndex) > 0 THEN BEGIN
 +
  IF SetLBItemUsingColumnDataItem(dialogID, listBrowserID, rowIndex, columnIndex, columnDataItemIndex) THEN BEGIN
 +
      { ... }
 +
  END;
 +
END;
 +
</code>
 +
</remark>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<version>
 
<version>
Availability: from VectorWorks11.0
+
Availability: from VectorWorks 11.0
  
 
</version>
 
</version>

Revision as of 03:07, 6 April 2015

.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

(Orso, 2015.04.06): this crashes VW 2013 if the cell doesn't have any column data items. Use a call to VS:GetNumLBColumnDataItems|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
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox