📄 ezinspect.pas
字号:
FBaseProperty.ValString:= Self.Items[Self.ItemIndex];
end;
FBaseProperty.Changed;
end;
procedure TInplaceComboBox.Change;
begin
inherited;
DoChange;
end;
{$IFDEF BCB}
function TInplaceComboBox.GetOnGoingOff: TGoingOffEvent;
begin
Result := FOnGoingOff;
end;
procedure TInplaceComboBox.SetOnGoingOff(const Value: TGoingOffEvent);
begin
FOnGoingOff := Value;
end;
{$ENDIF}
{ TInplaceSymbolsBox }
constructor TInplaceSymbolsBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//If Not ( csDesigning In ComponentState ) Then
Visible := False;
BorderStyle:= bsNone;
Color:= clBtnFace;
end;
procedure TInplaceSymbolsBox.CMEnter(var Message: TCMEnter);
begin
Inherited;
FRequireNotification := True;
end;
procedure TInplaceSymbolsBox.CMExit(var Message: TCMExit);
Var
allowExit: Boolean;
Begin
Inherited;
allowExit := True;
If FRequireNotification = True Then
TriggerGoingOffEvent( goNone, allowExit );
If allowExit Then
Begin
DoChange;
FRequireNotification := False;
Visible := False;
End
Else
Begin
MessageBeep( $FFFF );
Windows.SetFocus( Self.Handle );
End;
end;
procedure TInplaceSymbolsBox.CNKeydown(var Message: TWMkeydown);
Var
allowExit: Boolean;
reason: TGoingOffReason;
Begin
allowExit := False;
reason := goNone;
With Message Do
Begin
Case CharCode Of
VK_TAB:
If ssShift In KeyDataToShiftState( KeyData ) Then
reason := goLTab
Else
reason := goRTab;
VK_RETURN:
reason := goEnter;
VK_ESCAPE:
reason := goEscape;
VK_UP:
if not DroppedDown then
reason := goUp;
VK_DOWN:
if not DroppedDown then
reason := goDown;
VK_LEFT:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goLeft;
VK_RIGHT:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goRight;
VK_HOME:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goHome;
VK_END:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goEnd;
VK_PRIOR:
reason := goPgUp;
VK_NEXT:
reason := goPgDn;
End;
If reason <> goNone Then
Begin
allowExit := True;
TriggerGoingOffEvent( reason, allowExit );
End;
If allowExit Then
Begin
DoChange;
FRequireNotification := False;
If reason <> goNone Then
Message.Result := 1; {to avoid beep on Return }
If reason = goEscape Then
MessageBeep( $FFFF );
Visible := False;
Windows.SetFocus( Parent.Handle );
End
Else
Begin
If reason <> goNone Then
MessageBeep( $FFFF );
exit;
End;
End;
end;
procedure TInplaceSymbolsBox.GoOff;
begin
FRequireNotification := False;
Visible := False;
Windows.SetFocus( Parent.Handle );
end;
procedure TInplaceSymbolsBox.TriggerGoingOffEvent(Reason: TGoingOffReason;
var AllowExit: Boolean);
begin
If Assigned( FOnGoingOff ) Then
FOnGoingOff( Self, Reason, AllowExit );
end;
procedure TInplaceSymbolsBox.Click;
begin
DoChange;
end;
procedure TInplaceSymbolsBox.DoChange;
begin
If FBaseProperty.ValInteger<> Self.ItemIndex then
begin
FBaseProperty.ValInteger:= Self.ItemIndex;
FBaseProperty.Changed;
end;
end;
{$IFDEF BCB}
function TInplaceSymbolsBox.GetOnGoingOff: TGoingOffEvent;
begin
Result := FOnGoingOff;
end;
procedure TInplaceSymbolsBox.SetOnGoingOff(const Value: TGoingOffEvent);
begin
FOnGoingOff := Value;
end;
{$ENDIF}
{ TInplaceLinetypeBox }
constructor TInplaceLinetypeBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//If Not ( csDesigning In ComponentState ) Then
Visible := False;
BorderStyle:= bsNone;
end;
procedure TInplaceLinetypeBox.CMEnter(var Message: TCMEnter);
begin
Inherited;
FRequireNotification := True;
end;
procedure TInplaceLinetypeBox.CMExit(var Message: TCMExit);
Var
allowExit: Boolean;
Begin
Inherited;
allowExit := True;
If FRequireNotification = True Then
TriggerGoingOffEvent( goNone, allowExit );
If allowExit Then
Begin
DoChange;
FRequireNotification := False;
Visible := False;
End
Else
Begin
MessageBeep( $FFFF );
Windows.SetFocus( Self.Handle );
End;
end;
procedure TInplaceLinetypeBox.CNKeydown(var Message: TWMkeydown);
Var
allowExit: Boolean;
reason: TGoingOffReason;
Begin
allowExit := False;
reason := goNone;
With Message Do
Begin
Case CharCode Of
VK_TAB:
If ssShift In KeyDataToShiftState( KeyData ) Then
reason := goLTab
Else
reason := goRTab;
VK_RETURN:
reason := goEnter;
VK_ESCAPE:
reason := goEscape;
VK_UP:
if not DroppedDown then
reason := goUp;
VK_DOWN:
if not DroppedDown then
reason := goDown;
VK_LEFT:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goLeft;
VK_RIGHT:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goRight;
VK_HOME:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goHome;
VK_END:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goEnd;
VK_PRIOR:
reason := goPgUp;
VK_NEXT:
reason := goPgDn;
End;
If reason <> goNone Then
Begin
allowExit := True;
TriggerGoingOffEvent( reason, allowExit );
End;
If allowExit Then
Begin
DoChange;
FRequireNotification := False;
If reason <> goNone Then
Message.Result := 1; {to avoid beep on Return }
If reason = goEscape Then
MessageBeep( $FFFF );
Visible := False;
Windows.SetFocus( Parent.Handle );
End
Else
Begin
If reason <> goNone Then
MessageBeep( $FFFF );
exit;
End;
End;
end;
procedure TInplaceLinetypeBox.GoOff;
begin
FRequireNotification := False;
Visible := False;
Windows.SetFocus( Parent.Handle );
end;
procedure TInplaceLinetypeBox.TriggerGoingOffEvent(Reason: TGoingOffReason;
var AllowExit: Boolean);
begin
If Assigned( FOnGoingOff ) Then
FOnGoingOff( Self, Reason, AllowExit );
end;
procedure TInplaceLinetypeBox.Click;
begin
DoChange;
end;
procedure TInplaceLinetypeBox.DoChange;
begin
if FBaseProperty.ValInteger= Self.ItemIndex then exit;
FBaseProperty.ValInteger:= Self.ItemIndex;
FBaseProperty.Changed;
end;
{$IFDEF BCB}
function TInplaceLinetypeBox.GetOnGoingOff: TGoingOffEvent;
begin
Result := FOnGoingOff;
end;
procedure TInplaceLinetypeBox.SetOnGoingOff(const Value: TGoingOffEvent);
begin
FOnGoingOff := Value;
end;
{$ENDIF}
{ TInplaceBrushstyleBox }
constructor TInplaceBrushstyleBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//If Not ( csDesigning In ComponentState ) Then
Visible := False;
BorderStyle:= bsNone;
end;
procedure TInplaceBrushstyleBox.CMEnter(var Message: TCMEnter);
begin
Inherited;
FRequireNotification := True;
end;
procedure TInplaceBrushstyleBox.CMExit(var Message: TCMExit);
Var
allowExit: Boolean;
Begin
Inherited;
allowExit := True;
If FRequireNotification = True Then
TriggerGoingOffEvent( goNone, allowExit );
If allowExit Then
Begin
DoChange;
FRequireNotification := False;
Visible := False;
End
Else
Begin
MessageBeep( $FFFF );
Windows.SetFocus( Self.Handle );
End;
end;
procedure TInplaceBrushstyleBox.CNKeydown(var Message: TWMkeydown);
Var
allowExit: Boolean;
reason: TGoingOffReason;
Begin
allowExit := False;
reason := goNone;
With Message Do
Begin
Case CharCode Of
VK_TAB:
If ssShift In KeyDataToShiftState( KeyData ) Then
reason := goLTab
Else
reason := goRTab;
VK_RETURN:
reason := goEnter;
VK_ESCAPE:
reason := goEscape;
VK_UP:
if not DroppedDown then
reason := goUp;
VK_DOWN:
if not DroppedDown then
reason := goDown;
VK_LEFT:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goLeft;
VK_RIGHT:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goRight;
VK_HOME:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goHome;
VK_END:
//If ssCtrl In KeyDataToShiftState(KeyData) Then
reason := goEnd;
VK_PRIOR:
reason := goPgUp;
VK_NEXT:
reason := goPgDn;
End;
If reason <> goNone Then
Begin
allowExit := True;
TriggerGoingOffEvent( reason, allowExit );
End;
If allowExit Then
Begin
DoChange;
FRequireNotification := False;
If reason <> goNone Then
Message.Result := 1; {to avoid beep on Return }
If reason = goEscape Then
MessageBeep( $FFFF );
Visible := False;
Windows.SetFocus( Parent.Handle );
End
Else
Begin
If reason <> goNone Then
MessageBeep( $FFFF );
exit;
End;
End;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -