TTeeCommander button bitmaps cut

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

TTeeCommander button bitmaps cut

Post by X-Ray » Wed Nov 26, 2014 10:59 am

Hello,

I am using a TTeeCommander component in an iOS project.
But somehow the buttons/bitmaps are always cut on the bottom of
TeeCommander toolbar, like in the attached screen shot.
TeeCommander.png
TeeCommander.png (54 KiB) Viewed 19825 times
Is there any way to correctly display these button?

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

Re: TTeeCommander button bitmaps cut

Post by Yeray » Thu Nov 27, 2014 9:01 am

Hello,

Have you tried to resize it?
Does it happen in the simulator or only in a real device?
Also note the editor/commander have been designed to help the developer to build and test their applications. These tools aren't designed to be accessed by the final users, so we don't recommend giving access to 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

X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

Re: TTeeCommander button bitmaps cut

Post by X-Ray » Thu Nov 27, 2014 9:34 am

Hello Yeray,

Yes, I tried to re-size it but it doesn't help. And the display is the same on the simulator too.
What is the recommended way to bind own toolbar buttons to the same functions?

X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

Re: TTeeCommander button bitmaps cut

Post by X-Ray » Tue Dec 02, 2014 2:24 pm

Hello Yeray,

It would be very nice if there were simply a set of actions available that I could use to link any UI element to those functions that are available on the TTeeCommander toolbar.

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

Re: TTeeCommander button bitmaps cut

Post by Yeray » Wed Dec 03, 2014 1:57 pm

Hello,

Here you have what the buttons in the commander actually do:

Code: Select all

procedure TTeeCommander.ButtonNormalClick(Sender: TObject);
var tmp : TCircledSeries;
begin
  tmp:=GetCircledSeries(0,0);

  if Assigned(tmp) and tmp.Visible then
     SetLabelCaption(CaptionPanel(TeeCommanMsg_NormalPieLabel))
  else
     SetLabelCaption(CaptionPanel(TeeCommanMsg_NormalLabel));

  {$IFDEF FMX}
  if Assigned(ButtonNormal) then
     ButtonNormal.Down:=True;
  {$ENDIF}
end;

procedure TTeeCommander.ButtonRotateClick(Sender: TObject);
begin
  SetLabelCaption(CaptionPanel(TeeCommanMsg_RotateLabel));

  {$IFDEF FMX}
  if Assigned(ButtonRotate) then
     ButtonRotate.Down:=True;
  {$ENDIF}
end;

procedure TTeeCommander.ButtonMoveClick(Sender: TObject);
begin
  SetLabelCaption(CaptionPanel(TeeCommanMsg_MoveLabel));

  {$IFDEF FMX}
  if Assigned(ButtonMove) then
     ButtonMove.Down:=True;
  {$ENDIF}
end;

procedure TTeeCommander.ButtonZoomClick(Sender: TObject);
begin
  SetLabelCaption(CaptionPanel(TeeCommanMsg_ZoomLabel));

  {$IFDEF FMX}
  if Assigned(ButtonZoom) then
     ButtonZoom.Down:=True;
  {$ENDIF}
end;

procedure TTeeCommander.ButtonDepthClick(Sender: TObject);
begin
  SetLabelCaption(CaptionPanel(TeeCommanMsg_DepthLabel));

  {$IFDEF FMX}
  if Assigned(ButtonDepth) then
     ButtonDepth.Down:=True;
  {$ENDIF}
end;

procedure TTeeCommander.Button3DClick(Sender: TObject);
begin
  if Assigned(FPanel) then
  begin
    {$IFDEF CLX}
    IChanging3D:=True;
    {$ENDIF}
    FPanel.View3D:={$IFDEF CLX}not {$ENDIF}FButton3D.Down;
    {$IFDEF CLX}
    IChanging3D:=False;
    {$ENDIF}
  end;
end;

procedure TTeeCommander.ButtonEditClick(Sender: TObject);
{$IFNDEF TEEOCXNOEDITOR}
var tmp : TCustomTeePanel;
{$ENDIF}
begin
  {$IFNDEF TEEOCXNOEDITOR}
  tmp:=nil;

  if Assigned(FEditor) then
     FEditor.Execute
  else
  if Assigned(FPanel) then
  begin
    tmp:=TTeePanelAccess(FPanel).GetEditablePanel;

    if tmp is TCustomChart then
       {$IFDEF FMX}
       TChartEditForm.Edit(nil,TCustomChart(tmp))
       {$ELSE}
       {$IFDEF TEEOCX}
       EditChart(self,TCustomChart(tmp)) //TA05015162
       {$ELSE}
       EditChart(nil,TCustomChart(tmp))
       {$ENDIF}
       {$ENDIF}
    else
    if tmp is TCustomTeePanelExtended then
       {$IFDEF FMX}
       TGradientEditor.Edit(nil,TCustomTeePanelExtended(tmp).Gradient);
       {$ELSE}
       EditTeeGradient(nil,TCustomTeePanelExtended(tmp).Gradient);
       {$ENDIF}
  end;

  if Assigned(FOnEditedChart) then
     if Assigned(tmp) and (tmp is TCustomChart) then
        FOnEditedChart(Self,TCustomChart(tmp));

  if Assigned(FButton3D) then
     FButton3D.Down:=FPanel.View3D;
  {$ENDIF}
end;

procedure TTeeCommander.ButtonPrintClick(Sender: TObject);
begin
  {$IFNDEF TEEOCXNOEDITOR}
  if Assigned(FPreviewer) then FPreviewer.Execute
  else
  if Assigned(FPanel) then
     {$IFDEF FMX}
     TChartPreview.Preview(nil, FPanel);
     {$ELSE}
     {$IFDEF TEEOCX}
     ChartPreview(self,FPanel); //TA05015162
     {$ELSE}
     ChartPreview(nil,FPanel);
     {$ENDIF}
     {$ENDIF}
  {$ENDIF}
end;

procedure TTeeCommander.ButtonCopyClick(Sender: TObject);
begin
  if Assigned(FPanel) then FPanel.CopyToClipboardBitmap;
end;

procedure TTeeCommander.ButtonSaveClick(Sender: TObject);
begin
  {$IFNDEF TEEOCXNOEDITOR}
  if Assigned(FPanel) then
     if FPanel is TCustomChart then
        SaveChartDialog(FPanel as TCustomChart);
  {$ENDIF}
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

X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

Re: TTeeCommander button bitmaps cut

Post by X-Ray » Wed Dec 03, 2014 3:57 pm

Hello Yeray,

but call "SetLabelCaption" is private of "TTeeCommander" so I can't use this call in my code.
Or did you think about another way?

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

Re: TTeeCommander button bitmaps cut

Post by Yeray » Thu Dec 04, 2014 10:58 am

Hello,
X-Ray wrote:but call "SetLabelCaption" is private of "TTeeCommander" so I can't use this call in my code.
Or did you think about another way?
I posted the relevant methods for you to have an idea about what they actually do.
I believe you own the TeeChart sources so there's no need to put here the complete TeeComma.pas unit.
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

X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

Re: TTeeCommander button bitmaps cut

Post by X-Ray » Thu Dec 04, 2014 11:17 am

Hello Yeray,

yes of course, but that would mean duplicating all the code in there!
It would be much more elegant to offer this functionality via Actions, this would remove all the
necessity to know about internals and to duplicate any code.

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

Re: TTeeCommander button bitmaps cut

Post by Yeray » Fri Dec 05, 2014 10:36 am

Hi,
X-Ray wrote:yes of course, but that would mean duplicating all the code in there!
It would be much more elegant to offer this functionality via Actions, this would remove all the
necessity to know about internals and to duplicate any code.
Sorry, I understood you wanted to put your own buttons doing the same the buttons on the commander do. I don't see how this could be done without repeating some code.
I may have misunderstood you.
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