Page 1 of 2
ChartListBox - prevent double selection
Posted: Sun Nov 18, 2007 4:43 pm
by 9349911
Hi support,
we use a ChartListBox for a TChart. Multiselect is set to False.
If you click on a series within the Listbox all works fine. The series will be selected dark blue. But if you click at the white space which is left in the ChartListBox, the last series will be selected in light blue. So you have two selections. One in dark blue and one in light blue.
How can I prevent this behaviour?
Posted: Mon Nov 19, 2007 2:19 pm
by narcis
Hi Dominik,
I'm not able to reproduce the problem here. Would you be so kind to let us know the exact steps I should follow to reproduce the problem here?
Thanks in advance!
Posted: Mon Nov 19, 2007 3:14 pm
by 9349911
Hi Narcis,
no problem.
That´s the way you can reproduce it (I have installed 8.01 pro within D2007).
- create a new VCL project
- place a ChartListBox on the Form
- place a TChart on the Form
- ChartListBox -> Linkage -> Chart = Chart1
- doubleclick TChart and create 2-3 FastLine Series
- Start/compile the application
-> you have a lot unused space below the last series.
- click on Series1
- click (left mouse button) on the white space below the last series and you will get this:
Posted: Mon Nov 19, 2007 3:29 pm
by narcis
Hi Dominik,
Thanks for the information but I'm not able to reproduce the problem here. Could you please try if v8.02, posted last weekend at the client area, solves the problem at your end?
Thanks in advance.
Posted: Mon Dec 03, 2007 7:11 am
by 9349911
Hi Narcis,
I´ve just installed 8.02 and the problem still exists.
What can I do to help fixing this issue?
Posted: Mon Dec 03, 2007 10:58 am
by yeray
Hi Dominik,
I've reproduced the issue here and added to the wish list (TV52012619).
And note that the item in the list is painted in a light color but it's not really selected.
Posted: Mon Dec 03, 2007 11:10 am
by 9349911
Hi Yeray,
you´re right the item is not selected. But a user will be a little bit confused if he see that.
Is there a workaround available ?
Posted: Mon Dec 03, 2007 2:18 pm
by narcis
Hi Dominik,
There's no workaround I can think of.
Posted: Mon Dec 03, 2007 2:22 pm
by 9349911
Ok hopefully the fix is available soon
Posted: Tue Dec 04, 2007 8:10 am
by 9333771
Hi!
I think this problem was solved there:
http://www.teechart.net/support/viewtop ... artlistbox
greatings,
Posted: Tue Dec 04, 2007 9:10 am
by 9349911
Hi Mariano,
I tried the code, but that won´t work for my problem!
Keep in mind .. It´s not a real double selection! It is only an useless marking of the last series in the chartlistbox in light blue.
Posted: Wed Dec 05, 2007 8:52 am
by 9333771
hi,
to be honest, i did not study in deep your problem. But i did have the same problem with this light blue that was here when he souldn't. I thought this topic could help you.
have a nice day,
Posted: Wed Dec 05, 2007 9:24 am
by yeray
Hi Dominik and Mariano,
The problem is that when you click on white space in the ChartListBox, the property ItemIndex from the ChartListBox points to the last item. So, as a workarround you ould do something like following:
Code: Select all
procedure TForm1.ChartListBox1Click(Sender: TObject);
var i:Integer;
begin
i := Chart1.SeriesCount;
repeat
i := i-1;
until (ChartListBox1.Selected[i]);
ChartListBox1.ItemIndex := i;
end;
Posted: Wed Dec 05, 2007 9:45 am
by 9349911
Hi Yeray,
that works great as workaround! Thx !
But it would be great to have a general fix in one of the next releases.
Posted: Mon Dec 10, 2007 9:53 pm
by 9349911
Hi Yeray,
the workaround works ... But it works not if you set MultiSelect to False. In our application we can´t offer Multiselect.
So do you have a workaround with MultiSelect set to false ?