Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The case of the shrinking combobox in a grid ...
Message
From
09/12/1998 16:20:35
 
 
To
09/12/1998 16:06:29
Hermann Strijewski
Fast Track Business Solutions
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00165781
Message ID:
00165791
Views:
14
>One of the columns on a grid is linked to an Integer field RESUSAGE.RES_NUM
>
>I have loaded the possible values for Resource_ID into an array
>SELECT NAME,RES_NUM FROM RESOURCES INTO ARRAY ARESOURCE
>
>I wanted to put a combo-box into that column so that it shows the NAME instead of the RES_NUM. So I deleteD the Text-Control that was in that column, added a combo-box and set the Controlsource to RESUSAGE.RES_NUM. That column is 196 pixels wide. I set SPARSE to .F. and the other attributes.
>
>It works perfectly upon loading and shows the information properly and in full width. However, as soon as any first field in that column gets the focus, all fields in that column shrink their contents to approx. 70 pixels wide and abbreviate their contents. It is still working ok, however, it displays only part of the value.
>
>Is this because the Controlsource is a numeric field?
>
>Is there any know fix to this kinda thing?
>
>Thanks so much in advance again!
>
>Greetings, hs


I had this exact same thing happen to me. Unfortunately, I can't remember how I solved it. :( I'm going to take a look at my code and tell you all the properties I changed. Maybe if you make yours just like mine, yours will work, too.

Border style - none
Bound column - 2
BoundTo - .T.
ColumnCOunt - 0
Style - Dropdown list

I put the rowsource stuff in the init:

cname = this.curname
IF EMPTY(cname)
cname = THIS.Name
ENDIF
SELECT ALLT(clname)+", "+ALLT(cfname) AS empname, empkey, ctype;
FROM employees ;
INTO CURSOR &cname ;
ORDER BY empname

THIS.RowSource = (cname)
THIS.RowSourceType = 2


I don't know if any of that will help, but I thought I'd try. I'm sorry I can't remember specifically what I did that solved it.

-Michelle
Previous
Reply
Map
View

Click here to load this message in the networking platform