ChartListBox - prevent double selection

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

ChartListBox - prevent double selection

Post by moelski » Sun Nov 18, 2007 4:43 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 19, 2007 2:19 pm

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!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Mon Nov 19, 2007 3:14 pm

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:

Image

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 19, 2007 3:29 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Mon Dec 03, 2007 7:11 am

Hi Narcis,

I´ve just installed 8.02 and the problem still exists.

What can I do to help fixing this issue?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Dec 03, 2007 10:58 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Mon Dec 03, 2007 11:10 am

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 ?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 03, 2007 2:18 pm

Hi Dominik,

There's no workaround I can think of.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Mon Dec 03, 2007 2:22 pm

Ok hopefully the fix is available soon :wink:

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Tue Dec 04, 2007 8:10 am

Hi!

I think this problem was solved there:
http://www.teechart.net/support/viewtop ... artlistbox

greatings,

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Tue Dec 04, 2007 9:10 am

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.

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Wed Dec 05, 2007 8:52 am

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,

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Dec 05, 2007 9:24 am

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Wed Dec 05, 2007 9:45 am

Hi Yeray,

that works great as workaround! Thx !

But it would be great to have a general fix in one of the next releases.

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Mon Dec 10, 2007 9:53 pm

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 ?

Post Reply