View Issue Details

IDProjectCategoryView StatusLast Update
0001533JEDI VCL00 JVCL Componentspublic2004-03-30 12:00
ReporterDierkAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001533: TJvXPBarItem.Hint don´t work with JvAppEvents.onHint
DescriptionOnhint on TjvXPBar it shows the "hintwindow" and event JvAppEvents.onHint occurs. This works correct.

But TJvXPBarItem.Hint only shows the "hintwindow" and event JvAppEvents.onHint doesn´t occur.

Regards
Dierk
TagsNo tags attached.

Activities

user72

2004-03-26 10:47

  ~0003482

It probably has something to do with the return value of the overriden ShowHint procedure. Can you debug it to verify that it is actually TJvXPbarItem that is at error instead of JvAppEvents. For eaxmple, try using a standard Delphi TApplicationEvents and see if it exhibits the same behavior.

Dierk

2004-03-27 07:36

reporter   ~0003486

Ok, I tried it.
It´s a bug in TJvXPbar.
I´ve tested with TApplicationEvents and with JVAppEvents, same result.

Ahh.. I found the answer....
The ShowHint event occurs only when the mousepointer is the defined time over the control. This is i think so, normal :)

Procedure ShowHint is therfore the wrong place to implement this hint changing code.
It must be placed in a onHint procedure.

Regards

Dierk

user72

2004-03-27 12:04

  ~0003488

There's no OnHint event for XPBar and I'm certainly not going to hook into the Application's OnHint event to resolve this issue. Any other suggestions?

Dierk

2004-03-28 23:27

reporter   ~0003492

Peter,
I have no concretely idea.
The only way (without big changes) is , I think so, to set the hints directly in the already used HookMouseMove procedure. In this case we can throw-away the overridden ShowHint.

Something like this:
======================================================
  if FHoverIndex > -1 then
  begin
    with VisibleItems[FHoverIndex] do
    begin
       if Action is TCustomAction then
         self.Hint := TCustomAction(Action).Hint
        else
         self.Hint := VisibleItems[FHoverIndex].Hint;
    end;
  end
  else
     Self.Hint:=FSavedBarHint;

======================================================
But where is then the location to define FSavedBarHint?

Regards

Dierk

user72

2004-03-30 03:29

  ~0003512

>But where is then the location to define FSavedBarHint?
That is a problem. How to know when to save it?

2004-03-30 05:44

 

JvXPBar.zip (10,891 bytes)

user72

2004-03-30 05:45

  ~0003516

Try the attached zip. Especially try changing the XPBar.Hint at design and runtime to check that it works.

Dierk

2004-03-30 06:01

reporter   ~0003517

Ahhh.. really tricky ;)
It works perfect. Tested in runtime und designtime, but only with fix as follow:

Still listed as bug 0001539 . It must be "if (NOT CheckDefaults".

procedure TJvXPBarItem.ActionChange(Sender: TObject; CheckDefaults: Boolean);
begin
  if Action is TCustomAction then
    with TCustomAction(Sender) do
    begin
      if (not CheckDefaults or Update) then // mw added to update action
      begin

user72

2004-03-30 12:00

  ~0003522

Done. See also 0001539

Issue History

Date Modified Username Field Change
2004-03-25 06:31 Dierk New Issue
2004-03-26 10:47 user72 Note Added: 0003482
2004-03-26 10:47 user72 Status new => assigned
2004-03-26 10:47 user72 Assigned To => user72
2004-03-27 07:36 Dierk Note Added: 0003486
2004-03-27 12:04 user72 Note Added: 0003488
2004-03-28 23:27 Dierk Note Added: 0003492
2004-03-30 03:29 user72 Note Added: 0003512
2004-03-30 05:44 user72 File Added: JvXPBar.zip
2004-03-30 05:45 user72 Note Added: 0003516
2004-03-30 06:01 Dierk Note Added: 0003517
2004-03-30 12:00 user72 Status assigned => resolved
2004-03-30 12:00 user72 Resolution open => fixed
2004-03-30 12:00 user72 Note Added: 0003522