View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003244 | JEDI VCL | 00 JVCL Components | public | 2005-09-28 10:32 | 2006-06-08 03:33 |
Reporter | nuclearspike | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003244: TJvXPBar's items ignore overridden captions and always use TAction's caption | ||||
Description | Typically, with other buttons and menus, you can assign the TAction and it will change the Caption (of the Menu/Button) to match the TAction. You can then override that Caption to use something else. When you run the program, it will show your overridden caption. With the XPBar, when the program first loads, it will use the overridden caption but nearly instantly it will be changed to the TAction's caption -- which I do not want it to display (some are too long and contain accelerators which screw up the keyboard shortcuts for users). | ||||
Tags | No tags attached. | ||||
|
The problem is in: TJvXPBarItem.ActionChange(Sender: TObject; CheckDefaults: Boolean); .. if not CheckDefaults or (Self.Caption = '') or (Self.Caption = Self.Name) then Self.Caption := Caption; When this function is called in TJvXPCustomWinXPBar.InitiateAction it passes "csLoading in ComponentState" for the "CheckDefaults" param. This means that when it loads initially, it will go through the proper checks, but every time after that (and it gets called more after that) it will change the Caption/Enabled/OnExecute/etc to the TAction's, ignoring the overrides since "not CheckDefaults" will ALWAYS eval as true when not loading, and thus stomp over my Caption with the TAction's. To fix the problem, in the InitiateAction procedure, I changed: Items[I].ActionChange(Items[I].Action, csLoading in ComponentState); to Items[I].ActionChange(Items[I].Action, True); I also then changed the DoActionChange() procedure to pass True rather than False into ActionChange(); That corrected the problem for my needs. This would not be how the release would be, since the changes negate the purpose of even having the CheckDefaults param. |
|
Could you then please try to find a more acceptable way to make it work ? |
|
I'd imagine just basing it off of TMenuItem or TButton's method of doing it |
|
Could you be so kind as to investigate your proposal? |
|
This is now fixed in SVN, the loop in InitiateAction had no reason to call ActionChange but should have been calling the ActionLink.Update method. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-09-28 10:32 | nuclearspike | New Issue | |
2005-10-14 12:49 | nuclearspike | Note Added: 0008030 | |
2005-10-14 12:51 | nuclearspike | Note Edited: 0008030 | |
2005-10-14 12:57 | nuclearspike | Note Edited: 0008030 | |
2005-11-22 09:27 | obones | Note Added: 0008145 | |
2005-11-22 09:27 | obones | Status | new => feedback |
2005-11-23 11:26 | nuclearspike | Note Added: 0008152 | |
2006-04-04 05:16 | obones | Note Added: 0008872 | |
2006-06-08 03:33 | obones | Status | feedback => resolved |
2006-06-08 03:33 | obones | Resolution | open => fixed |
2006-06-08 03:33 | obones | Assigned To | => obones |
2006-06-08 03:33 | obones | Note Added: 0009442 |