Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo in Grid - I can't read anything!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00265671
Message ID:
00265760
Views:
26
>
>
> 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.
>

Sparse controls whether or not the combobox will remain visible when the grid cell does not have the focus. IIRC, when Sparse if .F., the combobox will be visible at all times. When .T., and the cell doesn't have focus, the combobox disappears and only the underlying text box is displayed. That shouldn't have any effect on your readability issue.

One other question (Probably a dumb one....) What is the 'SpecialEffect = 1' for?

Good luck,
Neil



> 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform