您的位置:首页 > 编程语言 > Delphi

DELPHI ScrollBox1响应鼠标滚轮和ComboBox禁止滚动

2014-04-27 00:00 796 查看
摘要: DELPHI ScrollBox1响应鼠标滚轮和ComboBox禁止滚动

DELPHI ScrollBox1响应鼠标滚轮和ComboBox禁止滚动

procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
if WheelDelta < 0 then
ScrollBox1.Perform(WM_VSCROLL,SB_LINEDOWN,0)
else
ScrollBox1.Perform(WM_VSCROLL,SB_LINEUP,0);
if ActiveControl is TComboBox then
if not TComboBox(ActiveControl).DroppedDown Then
Handled:=True;
end;

#Delphi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: