MSFlexGrid 完全参考手册

MSFlexGrid完全参考手册:

Elysium's BLOG: http://blog.csdn.net/elysium

Object FlexGrid

The Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MSFlexGrid displays read-only data.

You can put text, a picture, or both, in any cell of an MSFlexGrid. The Row and Col properties specify the current cell in an MSFlexGrid. You can specify the current cell in code, or the user can change it at run time using the mouse or the arrow keys. The Text property references the contents of the current cell.

If the text in a cell is too long to display in the cell, and the WordWrap property is set to True, the text wraps to the next line within the same cell. To display the wrapped text, you may need to increase the cell’s column width (ColWidth property) or row height (RowHeight property).

Use the Col and Row properties to determine the number of columns and rows in an FlexGrid.

 

Properties

FlexGrid support Common properties of objects.

 

Styles

FlexGrid support Common WINDOWS styles .

 

Methods

FlexGrid support Common Windows methods, and also own:

Methods of strings and columns

GETROWS Returns number of strings in the table.
SETROWS Sets number of strings in the table.
GETCOLS Returns number of columns in the table.
SETCOLS Sets number of columns in the table.
GETFIXEDROWS Returns number of the fixed strings in the table.
SETFIXEDROWS Sets number of the fixed strings in the table.
GETFIXEDCOLS Returns number of the fixed columns in the table.
SETFIXEDCOLS Sets number of the fixed columns in the table.
GETFIXEDALIGNMENT Returns a flag of alignment of the text the fixed cells of a column.
SETFIXEDALIGNMENT Sets a flag of alignment of the text the fixed cells of a column.
GETTOPROW Returns value of o-coordinate of the top left corner of the first seen string.
SETTOPROW Sets value of o-coordinate of the top left corner of the first seen string.
GETLEFTCOL Returns value of at - Coordinate of the top left corner of the first seen column.
SETLEFTCOL Sets value of at - Coordinate of the top left corner of the first seen column.
GETROW Returns number of the current string.
SETROW Sets number of the current string.
GETCOL Returns number of the current column.
SETCOL Sets number of the current column.
GETROWSEL Returns number of the chosen string.
SETROWSEL Sets the chosen string.
GETCOLSEL Returns number of the chosen column.
SETCOLSEL Sets number of the chosen column.
GETMOUSEROW Returns a position of the cursor of the mouse in coordinates of strings.
GETMOUSECOL Returns a position of the cursor of the mouse in coordinates of columns.
GETROWHEIGHTMIN Returns the minimal value of height of a string (in pixels).
SETROWHEIGHTMIN Sets the minimal value of height of a string (in pixels).
SETROWPOSITION Changes the order of strings in the table.
GETCOLALIGNMENT Returns a flag of alignment of the text of a column.
SETCOLALIGNMENT Sets a flag of alignment of the text of a column.
GETCOLWIDTH Returns value of width of a column.
SETCOLWIDTH Sets value of width of a column.
GETROWHEIGHT Returns value of height of a string.
SETROWHEIGHT Sets value of height of a string.
GETMERGEROW Returns value of a flag of association of strings.
SETMERGEROW Sets value of a flag of association of strings.
GETMERGECOL Returns value of a flag of association of columns.
SETMERGECOL Sets value of a flag of association of columns.
SETCOLPOSITION Changes the order of columns in the table.
GETROWDATA Returns the established number for the specified string.
SETROWDATA Sets number for the specified string.
GETCOLDATA Returns the established number for the specified column.
SETCOLDATA Sets number for the specified column.
GETROWISVISIBLE determines, whether the specified string is seen.
GETCOLISVISIBLE determines, whether we see the specified column.
GETROWPOS determines distance (in pixels) between left top a corner of the table and left top a corner of the specified string.
GETCOLPOS determines distance (in pixels) between left top a corner of the table and left top a corner of the specified column.
GETPOSINFO Returns a dynamic array which elements contain results of a call of methods.
ADDCOLUMN Adds a column.
DELETECOL Removes a column.
DELETECOLS Removes columns.
DELETEROW Removes a string.
DELETEROWS Removes strings.
REMOVECOLUMN Removes a column.

Methods of work with color

 

GETBACKCOLOR Returns value of color of a background of elements of the table in system R, G, B.
SETBACKCOLOR Sets value of color of a background of elements of the table in system R, G, B.
GETFORECOLOR Returns value of color of the text of elements of the table in system (R, G, B).
SETFORECOLOR Sets value of color of the text of elements of the table in system (R, G, B).
GETBACKCOLORFIXED Returns value of color of the fixed part of the table in system R, G, B.
SETBACKCOLORFIXED Sets value of color of the fixed part of the table in system R, G, B.
GETFORECOLORFIXED Returns value of color of the text of the fixed part of the table in system R, G, B.
SETFORECOLORFIXED Sets value of color of the text of the fixed part of the table in system R, G, B.
GETBACKCOLORSEL Returns value of the color, the selected strings (columns) of the table in system R, G, B.
SETBACKCOLORSEL Sets value of the color, the selected strings (columns) of the table in system R, G, B.
GETFORECOLORSEL Returns value of color of the text, the selected strings (columns) of the table in system R, G, B.
SETFORECOLORSEL Sets value of color of the text, the selected strings (columns) of the table in system R, G, B.
GETBACKCOLORBKG Returns value of color of the table in system R, G, B.
SETBACKCOLORBKG Sets value of color of the table in system R, G, B.
GETMOUSEPOINTER Returns value of the index of the cursor of the mouse.
SETMOUSEPOINTER Sets value of the index of the cursor of the mouse.
GETMOUSEICON Returns the index of the cursor of the mouse.
SETMOUSEICON Sets the index of the cursor of the mouse
GETPICTURETYPE Returns type of a graphic representation.
SETPICTURETYPE Sets type of a graphic representation.
GetPicture Returns the image of the table.
GETCOLORINFO Returns the information color installations of object. With color.

 

Methods of work with the text

GETWORDWRAP Returns value of a flag "wordwrap".
SETWORDWRAP Sets value of a flag "wordwrap".
GetText Returns value of a cell.
SETTEXT Sets value to a cell or set of cells.
GETFONT Returns the established font.
SETFONT Sets a font for the table.
GETFONTWIDTH Returns value of width of a font.
SETFONTWIDTH Sets width of a font.
GETTEXTSTYLE returns style of the text
SETTEXTSTYLE Sets style of the text.
GETTEXTSTYLEFIXED Returns value of a flag of style of the text of the fixed part
SETTEXTSTYLEFIXED Sets value of a flag of style of the text of the fixed part.
GETTEXTARRAY Returns value of an any cell
SETTEXTARRAY Sets value of an any cell.
GETTEXTMATRIX Returns value of an any cell
SETTEXTMATRIX Sets value of an any cell
REPLACETEXT Finds and replace the text
REPLACETEXTEXACT - " -
REPLACENEXTTEXT - " -
REPLACEALLTEXT - " -
SETITEMTEXT Sets the text of a string
SETITEMSTEXT - " -
SETITEMTEXTEX - " -
SETITEMSTEXTEX - " -
 

Methods of work with cells of the table

GETCELLLEFT Returns value of o-coordinate of the left top corner of a cell.
GETCELLTOP Returns value of Y-coordinate of the left top corner of a cell.
GETCELLWIDTH Returns value of width of a cell.
GETCELLHEIGHT Returns value of height of a cell.
GETCELLFONTNAME Returns value of a name of a font of a cell.
SETCELLFONTNAME Sets value of a name of a font of a cell
GETCELLFONTSIZE Returns value of the size of a font of a cell
SETCELLFONTSIZE Sets value of the size of a font of a cell.
GETCELLFONTBOLD Returns value of style of a font of a cell
SETCELLFONTBOLD Sets value of style of a font of a cell (bold)
GETCELLFONTITALIC Returns value of style of a font of a cell
SETCELLFONTITALIC Sets value of style of a font of a cell (italics)
GETCELLFONTUNDERLINE Returns value of style of a font of a cell
SETCELLFONTUNDERLINE Sets value of style of a font of a cell (underlining)
GETCELLFONTSTRIKETHROUGH Returns value of style of a font of a cell
SETCELLFONTSTRIKETHROUGH Sets value of style of a font of a cell (deletion)
GETCELLFONTWIDTH Returns value of width of a font of a cell
SETCELLFONTWIDTH Sets value of width of a font of a cell
GETCELLBACKCOLOR Returns value of color of a cell
SETCELLBACKCOLOR Sets value of color of a cell
GETCELLFORECOLOR Returns value of color of a font of a cell
SETCELLFORECOLOR Sets value of color of a font of a cell
GETCELLALIGNMENT Returns value of a flag of alignment of the text of a cell.
SETCELLALIGNMENT Sets value of a flag of alignment of the text of a cell.
GETCELLTEXTSTYLE Returns style of the text of a cell
SETCELLTEXTSTYLE Sets style of the text of a cell
GETCELLPICTUREALIGNMENT Returns value of a flag of alignment of the image in a cell
SETCELLPICTUREALIGNMENT Sets value of a flag of alignment of the image in a cell
GETMERGECELLS Returns a flag of association of cells
SETMERGECELLS Sets a flag of association of cells
GETCELLPICTURE Returns a file name of the image for the current cell
SETCELLPICTURE Sets a file of the image for the current cell
SETCELLSTEXT Sets value to cells from the given rectangular area
FINDCELL Search of a cell
FINDCELLEXACT Search of a cell
FINDNEXTCELL Search of a cell
REPLACECELL Search and replace
REPLACECELLEXACT Search and replace
REPLACENEXTCELL Search and replace
REPLACEALLCELLS Search and replace

Methods of work with the table

GETFILLSTYLE Returns value of the flag determining installation of property Text
SETFILLSTYLE Sets a flag, whether which determines property Text to one or all selected cells of object is applied
GETGRIDLINES Returns type of lines
SETGRIDLINES Sets type of a line between cells, heading, empty areas
GETGRIDLINESFIXED Returns type of a line
SETGRIDLINESFIXED Sets type of a line between cells of the fixed strings and columns
GETGRIDCOLOR Returns color of lines between cells
SETGRIDCOLOR Sets color of lines between cells of object
GETGRIDCOLORFIXED Returns color of lines between cells of the fixed part of the table
SETGRIDCOLORFIXED Sets color of lines between cells of the fixed part of the table
GETGRIDLINEWIDTH Returns thickness of lines
SETGRIDLINEWIDTH Sets thickness of lines
GETBORDERSTYLE Returns style of a framework
SETBORDERSTYLE Sets style of a framework of the table

 

Other methods

GETLISTCONTENTS Returns the contents of the table limited to a given rectangular
CLEARREGION Clears contents of a rectangular
GETSCROLLTRACK returns value of a flag of scrolling
SETSCROLLTRACK Sets value of a flag, whether which specifies the table should scroll contents when the user moves a scroll box of a strip of scrolling
GETFOCUSRECT Returns value of a flag of a portrayal of a rectangular
SETFOCUSRECT Sets a flag, whether which specifies the rectangular around of the current cell
GETHIGHLIGHT Returns value of a flag of illumination
SETHIGHLIGHT Sets a flag, whether which determines the selected cells highlighted
GETREDRAW returns a flag of automatic copying
SETREDRAW Sets a flag: whether to carry out automatic copying object at various changes
GETSCROLLBARS returns type of a strip of scrolling
SETSCROLLBARS Sets type of strips of scrolling of object
GETVERSION Returns the version of object which is loaded in memories
GETFORMATSTRING Returns a string of formatting
SETFORMATSTRING Sets: values of width of columns, flags of alignment, the text of the fixed string, the text of the fixed column
GETCLIP returns value of the chosen area of object
SETCLIP Sets value of the chosen area of object
SETSORT Sets type of sorting
GETSELECTIONMODE Returns a flag of a choice
SETSELECTIONMODE Sets a flag allowing to carry out a choice of cells, strings, columns
ADDITEM Adds an element of the table
ADDITEMS Adds elements of the table
ADDITEMEX Adds an element of the table
ADDITEMSEX Adds elements of the table
Clear Clears values of cells, strings of formatting
REFRESH Draws again contents of object.
REMOVEITEM Deletes the specified string of the table
GETALLOWBIGSELECTION Returns a flag of full selection
SETALLOWBIGSELECTION Sets a flag, whether which specifies the column (string) completely should be selected
GETALLOWUSERRESIZING Returns a flag of change of the size of strings and columns
SETALLOWUSERRESIZING Sets a flag of an opportunity to change the size of strings and columns
GETENABLED Returns a flag of access
SETENABLED Sets a flag, whether which determines the object is accessible to change
GETAPPEARANCE Returns a flag of 3 measured effects
SETAPPEARANCE Sets a flag, whether which determines the object by 3 measured effects should be painted
GETRIGHTTOLEFT Returns a flag of a direction of the text
SETRIGHTTOLEFT Sets a flag of a direction of the text
GETOLEDROPMODE  
SETOLEDROPMODE  
OLEDrag  
GetSel Returns a dynamic array which contains values of cells of the selected area
SETFINDPOSITION Sets the beginning of search
SETFINDDIRECTION Sets a flag of a direction of search
SAVELISTCONTENTS  
SAVELISTCONTENTSH  
AddFromSpr Adds the data in the table of the BRIZ table
FillFromSpr Fills the data in the table of the BRIZ table
ReplaceFromSpr Fills in object the data from the BRIZ table with code conversion

Events

FLEXGRID support Common WINDOWS events , Common events of objects , and also own.

OnFGClick - click of the button of the mouse on a cell
OnColumnClick - at click by the button of the mouse on the fixed string
ONDROP - arises at end of operation Drag-and-Drop
ONDROPHOVER - arises at end of operation Drag-and-Drop
OnFGDblClick - a double click of the button of the mouse on a cell
OnFGEnterCell - at occurrence in a cell
OnFGKeyDown - pressing of any key
OnFGKeyPress - pressing of nonfunctional keys
OnFGKeyUp - a release of a key of the keyboard
OnFGLeaveCell - at a leave of a cell
OnFGMouseDown - arises by pressing a key of the mouse
OnFGMouseMove - at cursor movement of the mouse
OnFGMouseUp - arises at a release of a key of the mouse
OnFGOLECompleteDrag -
OnFGOLEDragDrop -
OnFGOLEDragOver -
OnFGOLEGiveFeedback -
OnFGOLESetData -
OnFGOLEStartDrag -
OnFGRowColChange - at change of the current string (column)
OnFGScroll - arises by pressing indexes of a strip of scrolling
OnFGSelChange - at change of the selected cell
OnRowClick - at click by the button of the mouse on the cell following after a fixed column
OnTimer - the timer

Returns a dynamic array:

Indus Description
1 a name of dialog (screen)
2 a name of object
3

Type of the message

50 messages from objects of the screen
51 messages from objects of dialog

4 the identifier of dialog
5 the identifier of object in dialog
6 the name of the message
 for OnFGMouseDown, OnFGMouseUp, OnFGMouseMove
7 a flag of the button of the mouse
8 a flag of pressing of key Shift
9 GetMouseCol
10 GetMouseRow
11 x-coordinate of the cursor of the mouse
12 y-coordinate of the cursor of the mouse
 for OnFGDblClick
7 GetMouseCol
8 GetMouseRow
9 x-coordinate of the cursor of the mouse
10 y-coordinate of the cursor of the mouse
 for OnFGKeyDown, OnFGKeyUp
7 KeyCode
8 Shift
9 GetCol
10 GetRow
 for OnFGKeyPress
7 KeyAscii
8 GetCol
9 GetRow
 for OnFGSelChange
7 GetRow
8 GetCol
9 GetRowSel
10 GetColSel
 for OnRowColChange
7 GetRow
8 GetCol
9 GetRowSel
10 GetColSel
 for OnFGEnterCell, OnFGLeaveCell
7 GetRow
8 GetCol
9 GetText
 for OnFGScroll
7 GetTopRow
8 GetLeftCol
9 GetRow
10 GetCol
 for OnFGClick, OnRowClick, OnColumnClick
7 GetMouseCol
8 GetMouseRow
9 x-coordinate of the cursor of the mouse
10 y-coordinate of the cursor of the mouse

 

Remark:

The call of a method can be made by number.

CALL GP.DlgObjectFn(1,3,"21",RET)
OR
CALL GP.DlgObjectFn(1,3,"GetColSel",RET)

Numbers of methods are given in the table:

0-GetRows1-SetRows2-GetCols3-SetCols
4-GetFixedRows5-SetFixedRows6-GetFixedCols7-SetFixedCols
8-GetVersion9-GetFormatString10-SetFormatString11-GetTopRow
12-SetTopRow13-GetLeftCol14-SetLeftCol15-GetRow
16-SetRow17-GetCol18-SetCol19-GetRowSel
20-SetRowSel21-GetColSel22-SetColSel23-GetText
24-SetText25-GetBackColor26-SetBackColor27-GetForeColor
28-SetForeColor29-GetBackColorFixed30-SetBackColorFixed31-GetForeColorFixed
32-SetForeColorFixed33-GetBackColorSel34-SetBackColorSel35-GetForeColorSel
36-SetForeColorSel37-GetBackColorBkg38-SetBackColorBkg39-GetWordWrap
40-SetWordWrap41-GetFont42-SetFont43-GetFontWidth
44-SetFontWidth45-GetCellFontName46-SetCellFontName47-GetCellFontSize
48-SetCellFontSize49-GetCellFontBold50-SetCellFontBold51-GetCellFontItalic
52-SetCellFontItalic53-GetCellFontUnderline54-SetCellFontUnderline55-GetCellFontStrikeThrough
56-SetCellFontStrikeThrough57-GetCellFontWidth58-SetCellFontWidth59-GetTextStyle
60-SetTextStyle61-GetTextStyleFixed62-SetTextStyleFixed63-GetScrollTrack
64-SetScrollTrack65-GetFocusRect66-SetFocusRect67-GetHighLight
68-SetHighLight69-GetRedraw70-SetRedraw71-GetScrollBars
72-SetScrollBars73-GetMouseRow74-GetMouseCol75-GetCellLeft
76-GetCellTop77-GetCellWidth78-GetCellHeight79-GetRowHeightMin
80-SetRowHeightMin81-GetFillStyle82-SetFillStyle83-GetGridLines
84-SetGridLines85-GetGridLinesFixed86-SetGridLinesFixed87-GetGridColor
88-SetGridColor89-GetGridColorFixed90-SetGridColorFixed91-GetCellBackColor
92-SetCellBackColor93-GetCellForeColor94-SetCellForeColor95-GetCellAlignment
96-SetCellAlignment97-GetCellTextStyle98-SetCellTextStyle99-GetCellPictureAlignment
100-SetCellPictureAlignment101-GetClip102-SetClip103-SetSort
104-GetSelectionMode105-SetSelectionMode106-GetMergeCells109-SetMergeCells
108-GetAllowBigSelection109-SetAllowBigSelection110-GetAllowUserResizing111-SetAllowUserResizing
112-GetBorderStyle113-SetBorderStyle114-GetEnabled115-SetEnabled
116-GetAppearance117-SetAppearance118-GetMousePointer119-SetMousePointer
120-GetMouseIcon121-SetMouseIcon122-GetPictureType123-SetPictureType
124-GetPicture125-GetCellPicture126-SetCellPicture127-GetTextArray
128-SetTextArray129-GetColAlignment130-SetColAlignment131-GetColWidth
132-SetColWidth133-GetRowHeight134-SetRowHeight135-GetMergeRow
136-SetMergeRow137-GetMergeCol140-SetMergeCol141-SetColPosition
142-GetRowData143-SetRowData144-GetColData145-SetColData
146-GetTextMatrix147-SetTextMatrix148-AddItem149-RemoveItem
150-Clear151-Refresh152-GetDataSource153-SetDataSource
154-owIsVisible155-GetColIsVisible156-GetRowPos157-GetColPos
158-ridLineWidth159-SetGridLineWidth160-GetFixedAlignment161-SetFixedAlignment
162-ightToLeft163-SetRightToLeft164-GetOLEDropMode165-SetOLEDropMode
166-OLEDrag167-SetRowPosition168-AddItems169-AddItemEx
170-AddItemsEx171-GetPosInfo172-GetColorInfo173-GetSel
174-SetCellsText175-GetCellRect176-SetSel177-SetSelText
178-FindCell177-FindCellExact178-FindNextCell179-SetFindPosition
182-SetFindDirection181-ReplaceCell182-ReplaceCellExact183-ReplaceNextCell
186-ReplaceAllCells185-ReplaceText186-ReplaceTextExact187-ReplaceNextText
190-ReplaceAllText189-SetItemText190-SetItemsText191-SetItemTextEx
194-SetItemsTextEx193-AddColumn194-RemoveColumn195-SaveListContents
196-SaveListContentsH197-ReplaceFromSpr198-AddFromSpr199-FillFromSpr
200-SetDefEditor201-GetDefEditor204-SetEditorPerColumn205-SetEditorPerRow
206-SetEditOnOff207-SetEditCell208-GetEditCell209-GetEditResult
210-SetAutoUpdate211-SetEditPosParam212-EnsureVisible213-GetListContents
214-ClearRegion215-DeleteRow216-DeleteCol217-DeleteRows
218-DeleteCols- -  

 自: http://briz.infotools.ru/html/027/grid.htm 

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值