📄 mainfrm.xfm
字号:
object frmErrIndicatorDemo: TfrmErrIndicatorDemo
Left = 356
Top = 157
ActiveControl = btnShowErrors
Anchors = [akLeft, akBottom]
AutoScroll = False
Caption = 'JvErrorIndicator Demo'
ClientHeight = 351
ClientWidth = 556
Color = clButton
Constraints.MinHeight = 340
Constraints.MinWidth = 520
Font.Color = clText
Font.Height = 11
Font.Name = 'MS Shell Dlg 2'
Font.Pitch = fpVariable
Font.Style = []
Font.Weight = 40
ParentFont = False
Position = poDesktopCenter
Scaled = False
OnCreate = FormCreate
PixelsPerInch = 96
object lblClient: TLabel
Left = 16
Top = 88
Width = 118
Height = 13
Caption = 'An IErrorIndicatorClient:'
end
object memDescription: TMemo
Left = 158
Top = 16
Width = 394
Height = 201
Anchors = [akLeft, akTop, akRight, akBottom]
Lines.Strings = (
'TJvErrorIndicator is patterned on the similarily named ErrorProv' +
'ider component available in Visual Studio .Net'
''
'The component presents a simple mechanism for indicating to the ' +
'end user that a control on a form has an error associated with i' +
't.'
''
'If an error description string is specified for the control, an ' +
'image appears next to the control. The image flashes in the mann' +
'er specified by BlinkStyle at the rate specified by BlinkRate. W' +
'hen the mouse hovers over the image, a ToolTip appears showing t' +
'he error description string.'
''
'Note that this demo displays error images for almost every contr' +
'ol but in a real program, you would typically display errors for' +
' one or two controls at a time.'
''
'The error descriptions that are displayed are controlled using t' +
'he Error[AControl] property.'
''
'KNOWN PROBLEMS:'
''
'1. When a form has AutoScroll set to true and an error image is ' +
'displayed outside the right edge, the whole form "moves" up and ' +
'down while it'#39's blinking.'
''
'You can see this behaviour for the groupbox in the demo: if you ' +
'set the forms AutoScroll property to true and the ImageAlignment' +
' to eiaXXXRight and click ShowErrors, the forms horizontal scrol' +
'lbars will show and hide along with the error image, making the ' +
'controls jump up and down on the form.'
''
'This behaviour becomes even worse if you Align the control to ei' +
'ther alTop or alBottom. Then the image moves further and further' +
' down to the bottom left for each timer tick.'
''
'No known solution yet, but leaving room outside the edge where t' +
'he image will be displayed avoids the problem.'
''
'2. Displaying error images while resizing the form or control wi' +
'll not move the error image along with the control smoothly: it ' +
'is moved when the internal BlinkThread triggers the update event' +
' and the movement can become jerky.'
''
'Solution could be to subclass the WndProc of each control and re' +
'act to the WM_SIZE message but I think it'#39's overkill: the curren' +
't solution should work well in most cases.'
''
'NOTE:'
'If you set BlinkRate to zero, the error images will not move at ' +
'all since this suspends the BlinkThread completely. It is better' +
' to set BlinkStyle to ebsNeverBlink and leave BlinkRate at it'#39's ' +
'default if you don'#39't want any blinking (setting BlinkRate to 0 s' +
'ets BlinkStyle to ebsNeverBlink but also stops the thread).'
''
'There are also two interfaces included: the IErrorIndicator and ' +
'IErrorIndicatorClient. IErrorIndicator is implemented by TJvErro' +
'rProvider and you can largely ignore it.'
''
'IErrorIndicatorClient should be used to implement error message ' +
'handling from a control directly. See the demo source for an exa' +
'mple on how to implement it.')
ScrollBars = ssVertical
TabOrder = 4
WrapAtValue = 394
end
object btnShowErrors: TButton
Left = 15
Top = 19
Width = 75
Height = 25
Caption = '&ShowErrors'
TabOrder = 0
OnClick = btnShowErrorsClick
end
object btnClearErrors: TButton
Left = 15
Top = 51
Width = 75
Height = 25
Caption = '&ClearErrors'
TabOrder = 1
OnClick = btnClearErrorsClick
end
object gbOptions: TGroupBox
Left = 0
Top = 221
Width = 556
Height = 130
Anchors = [akLeft, akRight, akBottom]
Caption = ' Options: '
TabOrder = 5
object isPreview: TJvImageSquare
Left = 360
Top = 73
Width = 40
Height = 40
HiColor = clButton
Text = 'isPreview'
end
object Label1: TLabel
Left = 24
Top = 30
Width = 84
Height = 13
Caption = 'Image &Alignment:'
end
object Label2: TLabel
Left = 24
Top = 76
Width = 75
Height = 13
Caption = 'Image &Padding:'
end
object Label3: TLabel
Left = 192
Top = 30
Width = 52
Height = 13
Caption = '&Blink Style:'
end
object Label4: TLabel
Left = 192
Top = 76
Width = 51
Height = 13
Caption = 'Blink &Rate:'
end
object Label5: TLabel
Left = 360
Top = 30
Width = 65
Height = 13
Caption = '&Image Index:'
end
object cbImageAlignment: TComboBox
Left = 24
Top = 44
Width = 129
Height = 21
Style = csDropDownList
ItemHeight = 15
Items.Strings = (
'eiaBottomLeft '
'eiaBottomRight'
'eiaMiddleLeft'
'eiaMiddleRight'
'eiaTopLeft'
'eiaTopRight')
TabOrder = 0
end
object edImagePadding: TEdit
Left = 24
Top = 92
Width = 113
Height = 21
TabOrder = 4
Text = '0'
end
object udImagePadding: TUpDown
Left = 138
Top = 92
Width = 15
Height = 21
Associate = edImagePadding
Min = -100
TabOrder = 5
end
object cbBlinkStyle: TComboBox
Left = 192
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -