dennis22
Programmer
- Oct 8, 2002
- 32
I am currently creating a grid class where I replace the textbox with a editbox if the field is a memo.
using this code below;
The reason why I needed an editbox is that I needed to show the memo field values in the grid completely and the capability to edit the memo field without introducing another window. (I think you know what I mean...)
My problem is even if I set the HighlightRow and HighlightStyle, the memo field Column is not Highlighted, only the text1 objects are.
Is there any fix to this problem, or maybe another alternative? I am using VFP8.
Thanks!
using this code below;
Code:
this.RecordSource = (this.gridalias)
this.RecordSourcetype = 1
for iColIndex = 1 to this.ColumnCount
this.Columns[iColIndex].Header1.FontBold = .t.
this.Columns[iColIndex].Header1.FontName = "Arial"
this.Columns[iColIndex].Header1.Alignment = 2
this.Columns[iColIndex].Header1.Caption = upper(this.Columns[iColIndex].Header1.Caption)
if type(this.Columns[iColIndex].Text1.Controlsource) == "M"
this.Columns[iColIndex].AddObject("Edit1","editbox")
this.Columns[iColIndex].CurrentControl = "Edit1"
this.Columns[iColIndex].text1.Visible = .F.
this.Columns[iColIndex].Edit1.IntegralHeight = .T.
this.Columns[iColIndex].Edit1.BorderStyle = 0
this.Columns[iColIndex].Edit1.Visible = .T.
this.Columns[iColIndex].Edit1.Scrollbars = 0
this.Columns[iColIndex].Sparse = .f.
this.Columns[iColIndex].ReadOnly = .F.
endif
next
this.Highlight = .t.
this.HighlightRow = .t.
this.HighlightStyle = 2
this.HighlightRowLineWidth = 0
The reason why I needed an editbox is that I needed to show the memo field values in the grid completely and the capability to edit the memo field without introducing another window. (I think you know what I mean...)
My problem is even if I set the HighlightRow and HighlightStyle, the memo field Column is not Highlighted, only the text1 objects are.
Is there any fix to this problem, or maybe another alternative? I am using VFP8.
Thanks!