Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
VCL
8-Byte Alignment
Action Classes
Additional Controls
Core VCL Classes
DFM to TEXT
Dialog Controls
Docking
Drag/Drop
Emulation Classes
Exceptions
Gestures
Graphics
MAPI Support
MDI Support
Multi-Monitor Support
OnGesture event
Printing
Property/Type Editors
Registry / INI Objects
Ribbon Controls
Sample Controls
Services
Standard Controls
Styles
System Controls
Thread support
Touch Controls
Type Info
Win 3.1 Controls
Win 32 Controls
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/VCL/Action Classes
[ Add a report in this area ]
Report #:
67219
Status:
Reported
The customisation button of a TActionToolBar should remain in its 'down' state while its dropdown menu is shown, but does not
Project:
Delphi
Build #:
11.0.2902.10471
Version:
11.0
Submitted By:
Chris Rolliston
Report Type:
Minor failure / Design problem
Date Reported:
9/26/2008 8:24:01 AM
Severity:
Commonly encountered problem
Last Updated:
2/13/2009 9:01:54 AM
Platform:
All platforms
Internal Tracking #:
Resolution:
None
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
The customisation button of a TActionToolBar (i.e., the right-aligned button with a downward arrowhead graphic) should remain in its 'down' state while its dropdown menu is being displayed, but in fact does not when the mouse cursor is moved.
Steps to Reproduce:
1. Run the 'WordPad' action band demo.
2. Click on one of the right-aligned toolbar buttons.
3. Move the mouse over the resulting menu, or indeed anywhere outside of the button itself and its parent toolbar (but don't actually click the mouse).
4. Result: the hutton loses its 'focussed' state, which is a non-standard behaviour. (Compare, for example, clicking on an equivalent button in Word 2003 and moving the cursor around.)
The underlying issue is that on receipt of a CM_MOUSELEAVE message, the button repaints itself regardless of whether its dropdown menu is being displayed.
Workarounds
Edit TCustomUtilityButton like this -
1. Add as a private field
FClicking: Boolean;
2. Amend Click as the following:
procedure TCustomUtilityButton.Click;
begin
FClicking := True;
try
if Assigned(FOnClick) then
FOnClick(Self);
finally
FClicking := False;
end;
end;
3. Amend CMMouseLeave as the following:
procedure TCustomUtilityButton.CMMouseLeave(var Message: TMessage);
begin
if not FClicking then //!!!added
inherited;
FScrollTimer.Enabled := False;
end;
Basically, this semi-hack relies on the fact that a CM_MOUSELEAVE message is manually sent after the menu is shown, this being so because of the UpdateTracking call at the end of TCustomButtonControl.MouseUp.
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us