单元格内显示进度条(0分)

  • 主题发起人 主题发起人 清越小生
  • 开始时间 开始时间

清越小生

Unregistered / Unconfirmed
GUEST, unregistred user!
目前想在单元格中显示进度条,希望是在stringGrid中,当然提供新的表格控件也可以,谢谢!
 
TCustomGrid is an abstract base class that can be used to implement
general purpose grid style controls. The control will call DrawCell for
each of the cells allowing the derived class to fill in the contents of
the cell. The base class handles scrolling, selection, cursor keys, and
scrollbars.
DrawCell
Called by Paint. If DefaultDrawing is true the font and brush are
intialized to the control font and cell color. The cell is prepainted
in the cell color and a focus rect is drawn in the focused cell after
DrawCell returns. The state passed will reflect whether the cell is
a fixed cell, the focused cell or in the selection.
SizeChanged
Called when the size of the grid has changed.
BorderStyle
Allows a single line border to be drawn around the control.
Col
The current column of the focused cell (runtime only).
ColCount
The number of columns in the grid.
ColWidths
The width of each column (up to a maximum MaxCustomExtents, runtime
only).
DefaultColWidth
The default column width. Changing this value will throw away any
customizationdo
ne either visually or through ColWidths.
DefaultDrawing
Indicates whether the Paint shoulddo
the drawing talked about above in
DrawCell.
DefaultRowHeight
The default row height. Changing this value will throw away any
customizationdo
ne either visually or through RowHeights.
FixedCols
The number of non-scrolling columns. This value must be at least one
below ColCount.
FixedRows
The number of non-scrolling rows. This value must be at least one
below RowCount.
GridLineWidth
The width of the lines drawn between the cells.
LeftCol
The index of the left most displayed column (runtime only).
Options
The following options are available:
goFixedHorzLine: Draw horizontal grid lines in the fixed cell area.
goFixedVertLine: Draw veritical grid lines in the fixed cell area.
goHorzLine: Draw horizontal lines between cells.
goVertLine: Draw vertical lines between cells.
goRangeSelect: Allow a range of cells to be selected.
goDrawFocusSelected: Draw the focused cell in the selected color.
goRowSizing: Allows rows to be individually resized.
goColSizing: Allows columns to be individually resized.
goRowMoving: Allows rows to be moved with the mouse
goColMoving: Allows columns to be moved with the mouse.
goEditing: Places an edit control over the focused cell.
goAlwaysShowEditor: Always shows the editor in place instead of
waiting for a keypress or F2 to display it.
goTabs: Enables the tabbing between columns.
goRowSelect: Selection and movement isdo
ne a row at a time.
Row
The row of the focused cell (runtime only).
RowCount
The number of rows in the grid.
RowHeights
The hieght of each row (up to a maximum MaxCustomExtents, runtime
only).
ScrollBars
Determines whether the control has scrollbars.
Selection
A TGridRect of the current selection.
TopLeftChanged
Called when the TopRow or LeftCol change.
TopRow
The index of the top most row displayed (runtime only)
VisibleColCount
The number of columns fully displayed. There could be one more column
partially displayed.
VisibleRowCount
The number of rows fully displayed. There could be one more row
partially displayed.
Protected members, for implementors of TCustomGrid descendents
DesignOptionBoost
Options mixed in only at design time to aid design-time editing.
Default = [goColSizing, goRowSizing], which makes grid cols and rows
resizeable at design time, regardless of the Options settings.
VirtualView
Controls the use of maximum screen clipping optimizations when the
grid window changes size. Default = False, which means only the
area exposed by the size change will be redrawn, for less flicker.
VirtualView = True means the entire data area of the grid is redrawn
when the size changes. This is required when the data displayed in
the grid is not bound to the number of rows or columns in the grid,
such as the dbgrid (a few grid rows displaying a view onto a million
row table).

{ TCustomDrawGrid }
{ A grid relies on the OnDrawCell event to display the cells.
CellRect
This method returns control relative screen coordinates of the cell or
an empty rectangle if the cell is not visible.
EditorMode
Setting to true shows the editor, as if the F2 key was pressed, when
goEditing is turned on and goAlwaysShowEditor is turned off.
MouseToCell
Takes control relative screen X, Y location and fills in the column and
row that contain that point.
OnColumnMoved
Called when the user request to move a column with the mouse when
the goColMoving option is on.
OnDrawCell
This event is passed the same information as the DrawCell method
discussed above.
OnGetEditMask
Called to retrieve edit mask in the inplace editor when goEditing is
turned on.
OnGetEditText
Called to retrieve text to edit when goEditing is turned on.
OnRowMoved
Called when the user request to move a row with the mouse when
the goRowMoving option is on.
OnSetEditText
Called when goEditing is turned on to reflect changes to the text
made by the editor.
OnTopLeftChanged
Invoked when TopRow or LeftCol change. }

{ TStringGrid }
{ TStringGrid adds to TDrawGrid the ability to save a string and associated
object (much like TListBox). It also adds to the DefaultDrawing the drawing
of the string associated with the current cell.
Cells
A ColCount by RowCount array of strings which are associated with each
cell. By default, the string is drawn into the cell before OnDrawCell
is called. This can be turned off (along with all the other default
drawing) by setting DefaultDrawing to false.
Cols
A TStrings object that contains the strings and objects in the column
indicated by Index. The TStrings will always have a count of RowCount.
If a another TStrings is assigned to it, the strings and objects beyond
RowCount are ignored.
Objects
A ColCount by Rowcount array of TObject's associated with each cell.
Object put into this array will *not* be destroyed automatically when
the grid is destroyed.
Rows
A TStrings object that contains the strings and objects in the row
indicated by Index. The TStrings will always have a count of ColCount.
If a another TStrings is assigned to it, the strings and objects beyond
ColCount are ignored. }
 
要对那个DrawCell函数高度关注!
 
另外,兄弟,你在大富翁上混客不能太抠了,一毛不拔小心没人理你!
 
后退
顶部