Naomi, Fabio
Thanks for your reply.
I just added a textbox over teh combobox having the column that the customer need to see then show the combobox when they are in edit mode. working fine.
Mo
>>Using VFP8. I have a combobox with SQL statement rowsource. it is select col1, col2 ..
>>
>>I want the combobox to show col2 when it is closed but to show col1,col2 when it is oppened (dropped) in that order.
>>It only shows col1 when it is closed. I thought the setting the DisplayValue will fix this problem but I can not even set the DisplayValue.
>>
>>So, is there a way to show col2 when the combobox is closed and show col1, col2 when it is open???
>>
>>Thanks
>>Mo
>
>the combobox is not efficient, but if you satisfy yourself
>( too hard to add a displaycolum baseclass's property !)
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>
>DEFINE CLASS form1 AS form
>
> ADD OBJECT combo1 AS combobox WITH ;
> BoundColumn = 2, ;
> ColumnCount = 3, ;
> ColumnWidths = "0", ;
> RowSourceType = 3, ;
> RowSource = "SELECT F2,F1,F2 FROM BYBY INTO CURSOR COMBO", ;
> Left = 120, ;
> Style = 2, ;
> Top = 36, ;
> Width = 205, ;
> BoundTo = .T., ;
> Name = "Combo1"
>
>
> PROCEDURE Load
> CREATE CURSOR byby (f1 c(20) DEFAULT PADC('_'+TRANS(RECCOUNT()),16,'1'),f2 c(30) DEFAULT PADC('_'+TRANS(RECCOUNT()),16,'2'))
> FOR k=1 TO 30
> APPEND BLANK
> NEXT
> ENDPROC
>
>
>ENDDEFINE
>