lcl: allow use of DropDownMenu for TToolButton.Style = tbsButton (delphi compatible)

git-svn-id: trunk@20504 -
This commit is contained in:
paul 2009-06-08 03:42:06 +00:00
parent 5a4bf4a31b
commit e55e302b7e

View File

@ -119,15 +119,11 @@ begin
begin begin
DropDownMenuDropped := False; DropDownMenuDropped := False;
//DebugLn('TToolButton.MouseUp ',Name,':',ClassName,' ',Style=tbsCheck); //DebugLn('TToolButton.MouseUp ',Name,':',ClassName,' ',Style=tbsCheck);
if (Style = tbsButton) then if (Style in [tbsButton, tbsDropDown]) then
Down := False;
if (Style = tbsDropDown) then
begin begin
if (FToolBar <> nil) and FMouseInControl and if (FToolBar <> nil) and FMouseInControl and
(X > ClientWidth - FToolBar.FDropDownWidth) then ((Style = tbsButton) or (X > ClientWidth - FToolBar.FDropDownWidth)) then
begin
DropDownMenuDropped := CheckMenuDropdown; DropDownMenuDropped := CheckMenuDropdown;
end;
Down := False; Down := False;
end; end;