John117 Posted March 5, 2009 Share Posted March 5, 2009 (edited) Hey I am writing an app and need help with this section. Please help if you can. CODE ;find the offer table and fill the list view with all instruments. mOffers = (TableAut)mDesk.FindMainTable("offers"); for (uint i = 1; i <= mOffers.RowCount; i++) string s = mOffers.CellValue(i, "Instrument").ToString(); ListViewItem lvi = listViewInstruments.Items.Add(s); mItems = lvi; lvi.SubItems.Add(mOffers.CellValue(i, "Bid").ToString()); lvi.SubItems.Add(mOffers.CellValue(i, "Ask").ToString()); Edited March 7, 2009 by Hatcheda Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 5, 2009 Share Posted March 5, 2009 (edited) Hey I am writing an app and need help with this section. Please help if you can. ;find the offer table and fill the list view with all instruments. mOffers = (FXCore.TableAut)mDesk.FindMainTable("offers"); for (uint i = 1; i <= mOffers.RowCount; i++) string s = mOffers.CellValue(i, "Instrument").ToString(); ListViewItem lvi = listViewInstruments.Items.Add(s); mItems[s] = lvi; lvi.SubItems.Add(mOffers.CellValue(i, "Bid").ToString()); lvi.SubItems.Add(mOffers.CellValue(i, "Ask").ToString()); What I have so far: - not much but gets feeds array info once array created. ;find the offer table and fill the list view with all instruments. $Offers = $tdesk.FindMainTable("offers"); Maybe something like this: Global $tdesk = ??? Global $hLV = _GUICtrlListView_Create(...) ;find the offer table and fill the list view with all instruments. $mOffers = $tdesk.FindMainTable("offers") For $i = 1 To $mOffers.RowCount $sString = $mOffers.CellValue($i, "Instrument").ToString() $iLVItem = _GUICtrlListView_AddItem($hLV, $sString) _GUICtrlListView_AddSubItem($hLV, $iLVItem, $mOffers.CellValue($i, "Bid").ToString(), 1) _GUICtrlListView_AddSubItem($hLV, $iLVItem, $mOffers.CellValue($i, "Ask").ToString(), 2) Next A lot of guessing here. You must have already created the $tdesk object and the ListView control whose handle is in $hLV. Edited March 5, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
John117 Posted March 6, 2009 Author Share Posted March 6, 2009 $Offers.RowCount ??? and $Offers.RowCount - 1 ??? Worked perfecty! Thanks for the "For $i = 1 To $mOffers.RowCount" Section! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now