MsFlexGrid用法大全(转)(国外英文资料).doc
文本预览下载声明
MsFlexGrid用法大全(转)(国外英文资料)
Use of the MsFlexGrid control in VB (collection)
assigns the text to the MsFlexGrid cell
MsFlexGrid. TextMatrix (3, 1) = Hello
inserts the background image in the MsFlexGrid control cell
Set MsFlexGrid. CellPicture = LoadPicture ( C: \ temp \ 1.bmp )
selects a unit
MsFlexGrid. Row = 1
MsFlexGrid. Col = 1
USES bold to format the currently selected unit
MsFlexGrid. CellFontBold = True
adds a new line
Using the AddItem method, the content of the different cells is separated by the Tab character
Dim the row as a string
Row = AAA BBB
MsFlexFrid1. AddItem row
how to implement the MSFlexGrid control singular line background is white, the double-count line background is blue?
Dim I As an Integer
With MSFlexGrid1
AllowBigSelection = True to set the grid style
The FillStyle = flexFillRepeat
For I = 0 To.rows 1
A: Col =.col =.fixedcols
ColSel =.cols () -.fixedcols - 1
If I Mod 2 = 0 Then
CellBackColor = hc0c0c0
The Else
CellBackColor = vbBlue blue
End the If
Next I
End With
How does MSFlexGrid control move to the last line
Msflexgrid1.toprow = msflexgrid1.rows - 1
how to determine whether msflexgrid has scrollbars
Declare Function GetScrollRange Lib user32 (ByVal hWnd As Long, ByVal nBar As Long, lpMinPos As)
Long, lpMaxPos As Long) As Long
Public Const SB_HORZ = h0
Public Const SB_VERT = H1
The Public Function VsScroll (MshGrid As MSHFlexGrid) As Boolean determines the visibility of the horizontal scroll bar
Dim As Long I
VsScroll = False
I = GetScrollRange (MshGrid. HWnd, SB_HORZ, lpMinPos, lpMaxPos)
If lpMaxPos lpMinPos Then VsScroll = True
End the Function
The Public Function HeScroll (MshGrid As MSHFlexGrid) As Boolean determines the visibility of the vertical scroll bar
Dim As Long I
HeScroll = False
I = GetScrollRange (MshGrid. HWnd, SB_VERT, lpMinPos, lpMaxPos)
If lpMaxPos lpMinPos Then HeScroll = True
End the Function
When program runs, you want to dynamically add the number of MSFlexgrid columns
Insert a column after
显示全部