Teecommander
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Teecommander
Hi
I want to make some buttons of the Teecommander for FMX myself.
How Can I call the MOVE-Function of the Teecommander by hitting one of my self-drawn buttons?
Can you list all commands of the teecommander?
Because my Teecommander has soo small buttons, I can not hit it on the screen, only with mouse it works fine.
thanks
I want to make some buttons of the Teecommander for FMX myself.
How Can I call the MOVE-Function of the Teecommander by hitting one of my self-drawn buttons?
Can you list all commands of the teecommander?
Because my Teecommander has soo small buttons, I can not hit it on the screen, only with mouse it works fine.
thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Teecommander
Hello,
InvalidedPanel method being like this:
That's what that button does:How Can I call the MOVE-Function of the Teecommander by hitting one of my self-drawn buttons?
Code: Select all
Procedure DoMove;
var tmpZ : Double;
begin
if not FPanel.Canvas.SupportsFullRotation then // SupportsZoom2D
Set3D;
With FPanel.View3DOptions do
begin
tmpZ:=1;
HorizOffsetFloat:=HorizOffsetFloat+((X-FOldX)*tmpZ);
VertOffsetFloat:=VertOffsetFloat+((Y-FOldY)*tmpZ);
end;
{$IFDEF FMX}
InvalidatePanel;
{$ENDIF}
FOldX:=X;
FOldY:=Y;
end;
Code: Select all
{$IFDEF FMX}
// When BufferedDisplay=True this is necessary because View3DOptions does not call
// FPanel.Invalidate
Procedure TTeeCommander.InvalidatePanel;
begin
FPanel.Invalidate;
end;
{$ENDIF}
I'm not 100% sure about what you request here. Anyway, being a source code customer, you should find all code behind TeeCommander at TeeComma.pas unit.Can you list all commands of the teecommander?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
yes I will look into the source. thanks
Maybe cou could tell me what I should write to a buttonclick method when I want that this botton should MOVE from the Commander.
Thanks a lot.
PS: BWT when I define a SERIES als POINT3DSeries and I click in the IDE Editor on the Series I get an error in XE6. (NOt found a property)
COuld you fix this please? IN the NON 3D POINT SERIES it works fine,
Maybe cou could tell me what I should write to a buttonclick method when I want that this botton should MOVE from the Commander.
Thanks a lot.
PS: BWT when I define a SERIES als POINT3DSeries and I click in the IDE Editor on the Series I get an error in XE6. (NOt found a property)
COuld you fix this please? IN the NON 3D POINT SERIES it works fine,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Teecommander
Hi Walter,
I already posted that code in my previous answer.walter0316 wrote: Maybe cou could tell me what I should write to a buttonclick method when I want that this botton should MOVE from the Commander.
Thanks for reporting. I added it (bug #1481) to the bug tracking system to be fixed for future releases. Please feel free to sign up and add yourself to the CC List to be notified about status updates.walter0316 wrote: PS: BWT when I define a SERIES als POINT3DSeries and I click in the IDE Editor on the Series I get an error in XE6. (NOt found a property)
COuld you fix this please? IN the NON 3D POINT SERIES it works fine,
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
is there a way to make the button larger so That I do not use a mouse but could use my fingers?
ANd How can I disable the Print and save button in the commander, as SHOWMODAL is not installed in my Tablet.
ANd How can I disable the Print and save button in the commander, as SHOWMODAL is not installed in my Tablet.
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
thanks a lot.
Ok, I ssee the move button. But I do not understand it, sorry I am nooot sooo good in delphi like you.
I would need the code for the first 6 icons on the commander from left.
PLEASE could you give me a code example? I still learn a lot from you.
thanks
walter
Ok, I ssee the move button. But I do not understand it, sorry I am nooot sooo good in delphi like you.
I would need the code for the first 6 icons on the commander from left.
PLEASE could you give me a code example? I still learn a lot from you.
thanks
walter
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Teecommander
Hi Walter,
Yes, you can customize that at TCustomTeeCommander.CreateButton in TeeComma.pas.walter0316 wrote:is there a way to make the button larger so That I do not use a mouse but could use my fingers?
You should do as in the HideTabs feature as shown in the All Features\Welcome!\Componets\Chart Editor\Chart Editor dialog example in the features demo, available at TeeChart's program group.walter0316 wrote:ANd How can I disable the Print and save button in the commander, as SHOWMODAL is not installed in my Tablet.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
the demo does not work properly with XE6. Ara has send me a zip but not working fine. (delphi XE6)
So I have noe demo available.
thanks
So I have noe demo available.
thanks
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
Then I must recompile the stuff, and I do not know how it done,s o that it will work with XE6. I tried to get it run with the demo - demo has some prop in it which XE6 does not have.Yes, you can customize that at TCustomTeeCommander.CreateButton in TeeComma.pas.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Teecommander
This is the VCL demo included with the binary installer, not the Firemonkey demo. Please run Tee9New.exe to find out that demo.walter0316 wrote:the demo does not work properly with XE6. Ara has send me a zip but not working fine. (delphi XE6)
So I have noe demo available.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Teecommander
Just run TeeRecompile tool shipped with the source code installer to compile all TeeChart packages and install them into your environment of choice.walter0316 wrote: Then I must recompile the stuff, and I do not know how it done,s o that it will work with XE6.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Teecommander
Find attached a basic example of how you should combine mouse events and commander code to achieve what you request. It is not fully functional, you should look further at TeeCommander on how events are combined.walter0316 wrote: PLEASE could you give me a code example? I still learn a lot from you.
Regarding mobile devices, you might be interested in a blog post I wrote about Delphi Gestures with TeeChart.
- Attachments
-
- CommanderMove.zip
- (7.24 KiB) Downloaded 1608 times
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
Thank you very much.
Would you be also be so kind and give me an example how to disable/hide the last 4 Icons in the commander? THanks!!!
Would you be also be so kind and give me an example how to disable/hide the last 4 Icons in the commander? THanks!!!
-
- Newbie
- Posts: 37
- Joined: Mon Jul 13, 2015 12:00 am
Re: Teecommander
ok, Narcis, I had to ignore some Property missing and del the Presentation unit in the uses clause for my XE6.
I could run now the example.
BUt I do not understand, what I must change, when I want to do a ROTATE command.
WOuld you mind telling me how to change it?
I thought the commander would be like the commander from the DB, where the Commandercommang is a Type in the call.
I could run now the example.
BUt I do not understand, what I must change, when I want to do a ROTATE command.
WOuld you mind telling me how to change it?
I thought the commander would be like the commander from the DB, where the Commandercommang is a Type in the call.
Re: Teecommander
Hello,
You can hide buttons from the TeeCommander as shown in the demo at "All features\Welcome !\Components\Toolbar\Custom buttons". Ie:
The "move" and the "rotate" buttons in the commander are used as flags.
This is the code being called at the MouseMove event when the "move" button is down (that's what Narcís' project shows):
This is the code being called at the MouseMove event when the "rotate" button is down:
You can hide buttons from the TeeCommander as shown in the demo at "All features\Welcome !\Components\Toolbar\Custom buttons". Ie:
Code: Select all
TeeCommander1.CreateControls( [ tcbRotate, tcbSeparator, tcb3D ] );
This is the code being called at the MouseMove event when the "move" button is down (that's what Narcís' project shows):
Code: Select all
Procedure DoMove;
var tmpZ : Double;
begin
if not FPanel.Canvas.SupportsFullRotation then // SupportsZoom2D
Set3D;
With FPanel.View3DOptions do
begin
tmpZ:=1;
HorizOffsetFloat:=HorizOffsetFloat+((X-FOldX)*tmpZ);
VertOffsetFloat:=VertOffsetFloat+((Y-FOldY)*tmpZ);
end;
{$IFDEF FMX}
InvalidatePanel;
{$ENDIF}
FOldX:=X;
FOldY:=Y;
end;
Code: Select all
Procedure DoRotate;
begin
// 2D with circled series (Pie, Gauge, Polar, Smith, etc):
if (not FPanel.View3D) and Assigned(ICircledSeries) then
ICircledSeries.RotationAngle:=Round(HalfDivPi*ICircledSeries.PointToAngle(X,Y))+ICircledSeries.RotationAngle
else
begin
Set3D;
with FPanel,View3DOptions do
begin
Orthogonal:=False;
if FAllowRotationX then
IDifX:=90.0*(X-FOldX)/Width
else
IDifX:=0;
if FAllowRotationY then
IDifY:=90.0*(FOldY-Y)/Height
else
IDifY:=0;
end;
IShift:=Shift;
DoRotation(IDifX,IDifY);
end;
FOldX:=X;
FOldY:=Y;
IRotating:=True;
end;
Procedure TTeeCommander.DoRotation(const IDifX,IDifY:Double);
function AllowFullRotation:Boolean;
begin
result:=FAllowFull or FPanel.Canvas.SupportsFullRotation;
end;
Function CorrectAngle(Const AAngle:Double):Double;
begin
result:=AAngle;
if result>360 then result:=result-360
else
if result<0 then result:=360+result;
end;
begin
with FPanel.View3DOptions do
if AllowFullRotation then
begin
if ssShift in IShift then
Tilt:=Round(CorrectAngle(Tilt+IDifY))
else
begin
RotationFloat:=CorrectAngle(RotationFloat+IDifX);
ElevationFloat:=CorrectAngle(ElevationFloat+IDifY);
end;
end
else
begin
if Assigned(ICircledSeries) then
begin
Rotation:=360;
if not AllowFullRotation then
Perspective:=0;
if IDifX<>0 then
with ICircledSeries do
RotationAngle:=Round(CorrectAngle(RotationAngle+IDifX));
end
else
RotationFloat:=TRotateTool.RotationChange(AllowFullRotation,RotationFloat,IDifX);
ElevationFloat:=TRotateTool.ElevationChange(AllowFullRotation,ElevationFloat,IDifY);
end;
{$IFDEF FMX}
InvalidatePanel;
{$ENDIF}
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |