Generally disable the new "hover" effect of 2014.12

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Generally disable the new "hover" effect of 2014.12

Post by jens.mertelmeyer » Thu Oct 09, 2014 3:31 pm

Hi there.

The new 2014.12 release of TeeChart comes with a new "hover" effect (see: New and Improved Features). As cool as it is, it is a too drastic change in behaviour (and performance, for some type of charts). While I'll happily be using it for new stuff, I'd like to turn it off for existing projects - Thus keeping the current behaviour.

This way, I'm a bit unhappy the hover effect is on by default. How would I best go about turning it off, by default? Should I best crawl through all my TChart-objects and turn and set Hover.Visible to False? If yes, where? The OnFormCreate-event, the OnActive-event? The constructor of the TForm itself?
Or would it be better to edit the TeeChart source and recompile it?

Many thanks in advance.

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

Re: Generally disable the new "hover" effect of 2014.12

Post by Yeray » Fri Oct 10, 2014 9:20 am

Hi Jens,

I've created a new ticket in the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=958

In the meanwhile you could call this at onCreate/onShow:

Code: Select all

Chart1.Hover.Visible := False;
Of course, modifying the TeeChart sources is also a valid option for those who own them.
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

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by jens.mertelmeyer » Mon Oct 27, 2014 6:35 pm

We can't consider this as a bug to be fixed. It's a new feature important enough to be enabled by default.
Although I can understand, I'm still not happy the way it is now. I will have to write code which targets the exact release of 2014.12- For every existing project in the company. For every chart that's already on a form, and for every chart that is dynamically generated.

Do you still have plans for introducing something like a "global" variable that let's me control whether Hover is enabled or not? This way, one would only have to set this variable once.

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

Re: Generally disable the new "hover" effect of 2014.12

Post by Yeray » Tue Oct 28, 2014 9:18 am

Hi Jens,
jens.mertelmeyer wrote: Although I can understand, I'm still not happy the way it is now. I will have to write code which targets the exact release of 2014.12- For every existing project in the company. For every chart that's already on a form, and for every chart that is dynamically generated.

Do you still have plans for introducing something like a "global" variable that let's me control whether Hover is enabled or not? This way, one would only have to set this variable once.
I'm sorry for the inconvenience this change generates but we haven't found a way to include such a global variable/property. Note TeeChart VCL/FMX now targets systems that don't have a registry so we can't use it. Also, it would behave differently depending on the machine's registry where final application will run on.
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

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by jens.mertelmeyer » Tue Oct 28, 2014 9:38 am

I probably made it sound too complicated. I see there are already some "global" variables that seem very similar: TeEngine.TeeAxisClickCap: Integer, for example. It "Determines the amount in pixels that is allowed when clicking near an Axis to trigger selection of the axis."

I am now asking for something like TeeNewlyCreatedChartsHaveHoverEnabled: Boolean :wink:

So the only modification you'd have to make would be
  • introduce that variable somewhere
  • check this variable in the constructor of a TChart component. If it's True (default), then set Hover enabled. If it's false, set Hover to disabled.

This way, I could simply set that variable to False before creating my forms.

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

Re: Generally disable the new "hover" effect of 2014.12

Post by Yeray » Tue Oct 28, 2014 1:23 pm

Hi Jens,

A private variable in TeEngine.pas could only be modified by SourceCode customers. And SourceCode customers already can modify the sources. Ie adding Visible:=False at TTeeHover.Create:

Code: Select all

Constructor TTeeHover.Create(const AOwner: TCustomTeePanel);
begin
  //...
  Visible:=false;
end;
And making this property public means users should still set it for each chart.

So I don't see where would be the gain.
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

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by jens.mertelmeyer » Tue Oct 28, 2014 4:37 pm

Yeray wrote:And making this property public means users should still set it for each chart.
No, why? Take the example you posted. Replace the hardcoded "False" with a public class variable "HoverGloballyEnabled". Done.

This way, annoying persons like me just need to set a single variable once. They now have their very own personal default value for hovering.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by Sandra » Fri Oct 31, 2014 4:45 pm

Hello Jens,

We will consider the inclusion your request in future versions. Also, An alternative, as a possibility, could be for you to setup a Chart initialise routine that creates and returns your Chart with any Settings that you wish to assign to it at creation time; in this case hover-off.

Thanks in advance,
Best Regards,
Sandra Pazos / 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

mch
Newbie
Newbie
Posts: 4
Joined: Wed Aug 26, 2015 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by mch » Tue Feb 16, 2016 11:04 pm

... and how would I do that in c++ per chart? I didn't find any method to set the Hover option to FALSE.

Any help is appreciated. Thanks!

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

Re: Generally disable the new "hover" effect of 2014.12

Post by Yeray » Wed Feb 17, 2016 8:37 am

Hello,
mch wrote:how would I do that in c++ per chart? I didn't find any method to set the Hover option to FALSE.
This works for me:

Code: Select all

Chart1->Hover->Visible=false;	
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

mch
Newbie
Newbie
Posts: 4
Joined: Wed Aug 26, 2015 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by mch » Wed Feb 17, 2016 2:51 pm

Hi,
Thanks for the quick reply but there is no Hover() method nor Hover member in CTChart class...
In case you didn't catch it, I am using C++.
Thanks

jens.mertelmeyer
Newbie
Newbie
Posts: 8
Joined: Fri Nov 13, 2015 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by jens.mertelmeyer » Wed Feb 17, 2016 6:16 pm

It works fine for me with 2014.12 in CPP Builder. The TChart has a member called "Hover".

mch
Newbie
Newbie
Posts: 4
Joined: Wed Aug 26, 2015 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by mch » Wed Feb 17, 2016 11:15 pm

It's working now. I had to generate the CHover class file from the ocx, add the GetHover() method from the CTChart class.

Why weren't the hover.h file included in "Steema Software\TeeChart Pro v2015 ActiveX Control\Utilities\New VC Classes" folder originally? It would have saved me all the digging.

Thanks for all the help!

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

Re: Generally disable the new "hover" effect of 2014.12

Post by star_it » Thu Feb 18, 2016 7:10 am

Hi,

Can u plz help me to generate CHover class in TeeChart2015?If possible please upload the chover class.

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

Re: Generally disable the new "hover" effect of 2014.12

Post by Yeray » Thu Feb 18, 2016 8:31 am

Hello,
mch wrote:Thanks for the quick reply but there is no Hover() method nor Hover member in CTChart class...
In case you didn't catch it, I am using C++.
Please note this is the VCL forum. That's why I assumed you were using TeeChart VCL in C++Builder.
If you are using TeeChart ActiveX, I'd suggest you to post your questions in the ActiveX forum here.
mch wrote:It's working now. I had to generate the CHover class file from the ocx, add the GetHover() method from the CTChart class.

Why weren't the hover.h file included in "Steema Software\TeeChart Pro v2015 ActiveX Control\Utilities\New VC Classes" folder originally? It would have saved me all the digging.
It wasn't included in TeeChart ActiveX v2015.0.0.2 by mistake, but it was corrected and included with v2015.0.0.3.
star_it wrote:Can u plz help me to generate CHover class in TeeChart2015?If possible please upload the chover class.
Are you using TeeChart ActiveX v2015.0.0.3? Can you try it?
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

Post Reply