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

_______________________________________________
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/[email protected]
** 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.

Reply via email to