Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo in Grid - I can't read anything!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00265671
Message ID:
00265740
Vues:
20
>When I put a combo in the grid, I get a default of white text on dark blue when it is selected.
>
>One thing that makes it difficult to read is that, for the default grid row height, the combo box is small enough that the borders obscure much of the text. You might try resizing the row height and see if your text visibility doesn't improve.
>
>Neil Preston
>
>


For some of the other combos in the grid, it's readable (white on blue like you're seeing). It's something about either the Sparse being set to .F. or the way I'm using the RowSource/Control Source that seems to mess this up.

If anyone's inclined to try this, here's the code needed to create the form:
DEFINE CLASS formz AS form

	Top = -1
	Left = 0
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT grid1 AS grid WITH ;
		ColumnCount = 1, ;
		Height = 157, ;
		Left = 36, ;
		RecordSource = "RO", ;
		RecordSourceType = 0, ;
		Top = 36, ;
		Width = 301, ;
		Name = "Grid1", ;
		Column1.FontSize = 8, ;
		Column1.ControlSource = "", ;
		Column1.Sparse = .F., ;
		Column1.Name = "Column1", ;
		Column2.ControlSource = "", ;
		Column2.Name = "Column2"


	ADD OBJECT formz.grid1.column1.header1 AS header WITH ;
		Caption = "Header1", ;
		Name = "Header1"


	ADD OBJECT formz.grid1.column1.combo1 AS combobox WITH ;
		FontSize = 8, ;
		BoundColumn = 2, ;
		RowSourceType = 6, ;
		RowSource = "ratecodeset.desc,iid", ;
		ControlSource = "ro.fk_dept", ;
		Height = 10, ;
		Left = 29, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		Top = 23, ;
		Width = 10, ;
		BorderStyle = 0, ;
		BoundTo = .T., ;
		Name = "Combo1"

	PROCEDURE Activate
		THISFORM.Grid1.Column1.Combo1.Requery()
	ENDPROC
The RO table (simplified to make the above work OK):

Record # Field Name Value
(1) fk_dept 1001
(2) fk_dept 1002
(3) fk_dept 1003

The RateCodeSet table looks like:

(1) iid 1001
desc Sample 1
(2) iid 1002
desc Sample 2
(3) iid 1003
desc Sample 3
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform