Combo boxes really use strings, so it might work better if the values loaded into the combo are converted to strings not the integers.
You're just now discovering this? It's been around a looooong time. Fred On Tue, Apr 17, 2012 at 3:41 PM, MB Software Solutions, LLC < [email protected]> wrote: > Summary: VFP9SP2 - combobox (List Type) in SCX form not showing proper > DisplayValue for negative values > > Controlsource is thisform.oRecord.ireftype, which is an integer field. > The cbo is built on the fly when the form shows depending on the record > data in thisform.SetReference method shown here: > > LOCAL loBox as ComboBox, lcTransType as String > loBox = this.cboReference > lcTransType = this.oRecord.cTransType > loBox.Clear > *** mjb 03/29/2012 - changed SHIP and BUY to use NEGATIVE values for > iRefType > DO CASE > <snipped> > CASE lcTransType = "BUY" > loBox.AddItem("Supplier") > loBox.AddListItem("-6",loBox.NewItemId,2) > *loBox.Enabled = .T. > loBox.Value = -6 && Supplier > * after assigning the value above to -6, it still doesn't > show > "Supplier" and the DisplayValue is still "" until I force it on the next > line > loBox.DisplayValue = "Supplier" > * at this point, the displayvalue truly is Supplier since I > set it > above, but after the next line's refresh, it goes back to nothing ("") > loBox.Refresh() > <snipped> > ENDCASE > > > I'm investigating this, but wanted to throw this out to the forum to see > if anyone's had a problem using NEGATIVE integer values in the > dropdowns. Other traits of this cbo: > - RowSourceType is 0 (None) > - ColumnCount = 2 > - ColumnWidths = "150,0" > - BoundColumn = 2 > - BoundTo = .T. > > My alternate plan to test next is instead of using negative values to > use some waaaay high never-reached-value like 6000. > > -- > Mike Babcock, MCP > MB Software Solutions, LLC > President, Chief Software Architect > http://mbsoftwaresolutions.com > http://fabmate.com > http://twitter.com/mbabcock16 > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJCBkso=mGVNoY3o9u_W_Qe3fX57jH+=2srhq6zsnphe+sg...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

