Hi,
I’m currently trying to implement a teechart-chart into our application’s new gui. Instead of using the tee-commander controlling the functions of the chart, I’m building my own menu with selected menu-actions of the tee-commander.
Is it (or how is it) possible to access the commander’s methods (e.g. rotate and zoom)? What I’m trying to achieve is having my own button for rotating the chart just like the rotate button on the tee-commander does.
Thanks in advance and best regards,
Dominik
access teechart commander methods
access teechart commander methods
- Attachments
-
- teechart_commander_v2017.PNG (11.49 KiB) Viewed 19463 times
Re: access teechart commander methods
Hello,
The easiest way for the rotation would probably be using a TRotateTool, and activate/deactivate it through your button.
The buttons in the commander basically set move/rotation modes. These modes use the mouse events to modify the Chart's Aspect Rotation/Elevation properties for the Rotation, and the HorizOffset/VertOffset for the Move.
The easiest way for the rotation would probably be using a TRotateTool, and activate/deactivate it through your button.
The buttons in the commander basically set move/rotation modes. These modes use the mouse events to modify the Chart's Aspect Rotation/Elevation properties for the Rotation, and the HorizOffset/VertOffset for the Move.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: access teechart commander methods
Hi,
I'm still trying to get this working the simple way.
In an older post here in the forum (http://216.92.243.79/support/viewtopic. ... 97a3a9f480) Yeray wrote, that that the "rotate" and "move" buttons are used as flags within the TeeChart Commander.
Is it possible to access these flags in order to have my buttons having the exact same behaviour as the TeeChart Commander's buttons have?
Thanks in advance
Dominik
I'm still trying to get this working the simple way.
In an older post here in the forum (http://216.92.243.79/support/viewtopic. ... 97a3a9f480) Yeray wrote, that that the "rotate" and "move" buttons are used as flags within the TeeChart Commander.
Is it possible to access these flags in order to have my buttons having the exact same behaviour as the TeeChart Commander's buttons have?
Thanks in advance
Dominik
Re: access teechart commander methods
Hello,
The only way I can think to have the exact same behaviour is by using it, hidden. Ie:
The only way I can think to have the exact same behaviour is by using it, hidden. Ie:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
TeeCommander1.Hide;
end;
procedure TForm1.MoveButtonClick(Sender: TObject);
begin
TeeCommander1.ButtonMove.Click;
TeeCommander1.ButtonMove.Down:=True;
end;
procedure TForm1.DepthButtonClick(Sender: TObject);
begin
TeeCommander1.ButtonDepth.Click;
TeeCommander1.ButtonDepth.Down:=True;
end;
procedure TForm1.ZoomButtonClick(Sender: TObject);
begin
TeeCommander1.ButtonZoom.Click;
TeeCommander1.ButtonZoom.Down:=True;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: access teechart commander methods
Hi Yeray,
thanks for your reply.
Using the TeeComander hidden was the plan.
I just tried your code but I can not access the method "click" and the property "down" of the ITeeCommanderButton-Object. Are these methods/properties public in TeeChart ActiveX?
Thats a excerpt of my code:
Do you have an idea?
Thanks in advance and best regards
Dominik
thanks for your reply.
Using the TeeComander hidden was the plan.
I just tried your code but I can not access the method "click" and the property "down" of the ITeeCommanderButton-Object. Are these methods/properties public in TeeChart ActiveX?
Thats a excerpt of my code:
Code: Select all
Dim button As TeeChart.ITeeCommanderButton 'Can be Mouse-, Rotate- or Zoom-Button.
Select Case MenuNo
Case sxMenuItems.sxMouse 'Mouse Cursor for Click-Events
Set button = Me.TeeCommander1.Object.ButtonMove
button.Click
button.Down = True
Case sxMenuItems.sxRotate 'Rotating the Chart
Set button = Me.TeeCommander1.Object.DepthButtonClick
button.Click
button.Down = True
Case sxMenuItems.sxZoom 'Zooming the Chart
Set button = Me.TeeCommander1.Object.ButtonZoom
button.Click
button.Down = True
End Select
Thanks in advance and best regards
Dominik
Re: access teechart commander methods
Hello,
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1852
Sorry, that's the problem.Dominik wrote:Are these methods/properties public in TeeChart ActiveX?
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1852
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: access teechart commander methods
Hi Yeray,
thanks for your support.
Best regards
Dominik
thanks for your support.
Best regards
Dominik