Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo boxes in Grids
Message
From
17/09/1999 07:07:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/09/1999 23:52:31
Jill Derickson
Software Specialties
Saipan, CNMI
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00265745
Message ID:
00265789
Views:
15
>I have a combo box in a grid to allow the user to make a choice from a table. The first
>column is the description, the second is a numeric value.
>
>The combo box is based on my SSComboBox class, which is based (w/no changes)
>on the base class Combobox.
>
>It all works fine, with Sparse set to .F., but when focus is on the column w/the combobox, the text in the box does not show, i.e., it seems like both fore color and back color are the same.
>
>I've discovered that, with no other changes, setting the Sparse property of the column to .T.
>(default), the characters show in white, w/the background blue. BUT, when the focus leaves the
>column, the second column of the table appears (the numeric code), rather than the text.
>
>I don't care about sparse one way or the other, but I want my user to see the text of their choice.
>
>Here are the non default settings:
>
>Grid:
>RecordSource cCTAs
>
>Column:
>ControlSource cCTAs.NewCTACode
>CurrentControl SSComboBox1
>
>SSComboBox1:
>BoundColumn 2
>BoundTo .T.
>ControlSource cCTAs.NewCTACode
>RowSource CtAppearancesDefs
>RowSourceType is 2 - Alias
>Style 2 - Dropdown List
>Value 0
>
>No other color settings, background, foreground or dynamic are set.
>
>BTW, Hacker's Guide says: The control that shows when Sparse is .T. and a cell doesn't have focus is a text box. But you don't have any control over it at all. It's not the default text box that gets put in the column when you create the grid. It's a different text box, internal to FoxPro.
>
>TIA for your input.
>
>Jill


Jill,
Sparse .t. is the good choice (IMHO). There is a bug in VFP, if inputmask is less then displayvalue then you don't see typed value in combo (in grid). Assign an inputmask to column that would hold longest possible value (ie:=replicate("X",fsize("myfield","mytable")).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform