📄 ucvhgrid.ctl
字号:
VERSION 5.00
Begin VB.UserControl ucVHGrid
BackColor = &H80000005&
ClientHeight = 3600
ClientLeft = 0
ClientTop = 0
ClientWidth = 4800
ControlContainer= -1 'True
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ScaleHeight = 3600
ScaleWidth = 4800
ToolboxBitmap = "ucvhGrid.ctx":0000
Begin VB.Label lblName
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 210
Left = 90
TabIndex = 0
Top = 45
Width = 1125
End
End
Attribute VB_Name = "ucVHGrid"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'-> so, who has best kung-fu?
' _/ _/_/_/ _/_/_/ _/_/_/ _/_/_/
' _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/
' _/ _/ _/ _/ _/ _/_/ _/_/_/ _/ _/ _/
' _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
' _/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/_/
'********************************************************************************************
'* vhGrid! vhGrid - Virtual Hybrid Grid Control 1.1 *
'* *
'* Started: November 18, 2006 *
'* Released: Febuary 19, 2006 *
'* Updated: Febuary 21, 2006 *
'* Purpose: Ultra-Fast Virtual Grid Hybrid *
'* Functions: (partial listing) *
'* Revision: 1.1.0 *
'* Compile: Native *
'* Author: John Underhill (Steppenwolfe) *
'* *
'********************************************************************************************
'-> Initialization <-
'-> GridInit RowCount, Columns
'-> AddCell Row, Column, Text, TextAlign, IconIndex, BackColor, ForeColor, Font, Indent, RowSpanDepth
'-> FastLoad Or Draw properties
'/~ These are the three core functions involved in loading grid data.
'/~ GridInit: sizes the internal arrays, and sets the grids item count. This should be called before adding data.
'/~ AddCell: loads cell data into the GridItem class array.
'/~ FastLoad: turns on drawing once the last item (specified by the GridInit parameters), has been loaded.
'/~ Draw: manually toggles the draw switch for the grid.
'-> Theming <-
'-> ThemeManager eSkinStyle, UseSkinTheme, ThemeColor, ThemeLuminence, ColumnFontColor, ColumnFontHiliteColor, ColumnFontPressedColor, OptionFormBackColor, OptionFormOffsetColor, OptionFormForeColor, OptionFormTransparency, OptionFormGradient, UseXPColors, OptionControlColor, IncludeAdvancedEdit, IncludeColumnTip, IncludeFilter, IncludeCellTip
'/~ Most style parameters can be set through this one call. Each option has a corresponding function so that option properties
'/~ may also be set individually.
'-> eSkinStyle: the skin image group
'-> UseSkinTheme: use skin colorization
'-> ThemeColor: skin colorization base
'-> ThemeLuminence: skin colorization depth
'-> ColumnFontColor, ColumnFontHiliteColor, ColumnFontPressedColor: column text colors
'-> OptionFormBackColor, OptionFormOffsetColor, OptionFormForeColor, OptionControlColor: filter, tooltip, columntip, and advanced edit forms, base color scheme
'-> OptionFormTransparency, OptionFormGradient, UseXPColors: option window effects options
'-> IncludeAdvancedEdit, IncludeColumnTip, IncludeFilter, IncludeCellTip: options to include in the theme change
'-> Row Spanning <-
'-> AddCell :=lRowDepth
'/~ Row spanning allows customizable row heights beyond limitations of the listview class. Rows can span the visible
'/~ client area, allowing for a large amount of data to be displayed on a single row. I would not recommend a span
'/~ depth of more then eight rows, and more then 10 spanned rows in a display, or using spanned rows when displaying
'/~ more then 5k items. There are a lot of calculations involved in this feature, and overuse can lead to slowdowns
'/~ in reaction and render times.
'-> Cell Spanning <-
'-> CellSpanHorizontal Row, FirstCell, LastCell
'/~ Cells can be spanned across any variation of column lengths, allowing for caption or story cells. Cell spanning
'/~ has only a modest impact on processing, and so can be used at will.
'-> SubCells <-
'-> SubCellAddControl Row, Cell, Width, Height, ControlHandle, Position, Left, Top, UseVirtualRow, UseVirtualCell
'/~ Control Subcells contain a control window. There are 15 integrated control types you can use, but a control
'/~ subcell can also use external controls by passing in the controls handle to the subcell and setting the controls
'/~ parent property to the grid hwnd. Control subcells are meant to be used sparingly, as each one requires
'/~ a unique control instance, (so say, you want 3 controls per row, 1k rows, that's 3k controls!). I would not
'/~ recommend more then 30 controls per grid instance.
'/~ I will probably add the ability to switch between edit controls, (on the fly?), lending greater flexibility
'/~ with that usage, but current implementation of subcells will remain as it is.
'-> Virtual Access
'/* Some features are not supported in virtual mode, simply because they require the GridItem class to work.
'/* Currently not supported: row spanning, cell spanning, column filter, subcells, cell tips, and cell headers.
'/* Properties or functions that rely on an internal data for calculations are also bypassed, for example
'/* ColumnTextFitHeight and Find.
'/* Cell tips and cell headers might be added later, using an events interface to collect the data.
'-> Owner Drawn Cells <-
'-> OwnerDrawImpl = 'object'
'/* Cells can be ownerdrawn through various stages of the cell rendering process. The default draw
'/* behaviors can also be bybassed by setting the bSkipdefault param to true within the callback interface.
'/* The callback returns the row and cell numbers, cell hdc, and a reference to the rows griditem class
'/* instance. The griditem variables can be changed or used as reference in the draw process.
'*** Notes ***
'-! Disclaimer
'/~ I don't usually put serious restrictions on my source, but I can see this getting some
'/~ usage so, here is the nasty bit..
'/~ Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -