Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002864 [JEDI VCL] 00 JVCL Components major always 2005-04-12 02:24 2005-05-18 09:15
Reporter ivobauer View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0002864: JvTabBar doesn't preserve the currently selected tab item
Description When attempting to change the currently selected tab at *design time* by setting the Selected property of that particular TJvTabBarItem to True, this change is not persistent, i.e. the changed value of the Selected property doesn't get written into DFM because it was told not to do so - see the 'stored False' specifier at the end of Selected property. Andreas, is there any reason for this?
Additional Information Although this might look like a banality, it leads to a serious problems when TJvTabBar is used in conjunction with TJvPageList (selected tab item and active page properties could easily get out of sync).
Tags No tags attached.
Attached Files

- Relationships

-  Notes
ivobauer (reporter)
2005-04-12 04:59

I've taken a quick look at the code and believe that the following modifications can fix the current situation (not tested though):

(1) Remove the 'stored False' specifier from the declaration of Selected property of TJvTabItem. Instead, some 'default False' specifier would be more appropriate, IMO.

(2) In TJvCustomTabBar introduce an overridden Loaded method whose implementation would look like this one:

function TJvCustomTabBar.Loaded;
  SelectedTab := FindSelectableTab(nil);

What do you think?
obones (administrator)
2005-05-18 06:13

Do you have a sample application for this?
ivobauer (reporter)
2005-05-18 06:59

Although this bug is quite reproducible, I'm afraid it's not feasible for me to prepare a test case. You have to do it yourself, it's very simple - just please follow those 6 steps I mentioned in 'Steps to reproduce' section.

I try to explain why the test case can't be prepared. The problem is that when I set Selected property of some TJvTabBarItem to True, this change isn't propagated to the DFM file *because* this property has 'stored False' in its declaration. If I prepare a test case for this bug on my machine and send it to you, you will simply see nothing wrong with the test case.

Hope I made it clear.
AHUser (developer)
2005-05-18 09:15

> (1)

I haven't stored the Item.Selected property because it was "calculated" from the TabBar. But while designing the component I must missed the fact that I do not have a published property that stores the selected tab index in the whole component.

This is fixed in CVS by replacing "stored False" by "default False" and the Loaded method is added.

- Issue History
Date Modified Username Field Change
2005-04-12 02:24 ivobauer New Issue
2005-04-12 02:27 ivobauer Issue Monitored: ivobauer
2005-04-12 04:59 ivobauer Note Added: 0006933
2005-05-18 06:13 obones Note Added: 0007192
2005-05-18 06:13 obones Status new => feedback
2005-05-18 06:59 ivobauer Note Added: 0007205
2005-05-18 09:15 AHUser Status feedback => resolved
2005-05-18 09:15 AHUser Resolution open => fixed
2005-05-18 09:15 AHUser Assigned To => AHUser
2005-05-18 09:15 AHUser Note Added: 0007216
2005-05-18 10:06 ivobauer Issue End Monitor: ivobauer

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker