Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combo boxes in Grids
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement