Jump to content

need assistance from an expert


Schlingel

Recommended Posts

Hello

 

I try many hours with the appended code(package) bring to work with uniGui.

The issues are, how the VCL class "TGraphicControl" can be replaced by a uniGui-class. Unfortunately, all my tryings are unsuccessful.

Maybe someone can help me here.

 

Thank you very much

viereck.zip

Link to comment
Share on other sites

Hello

 

I try many hours with the appended code(package) bring to work with uniGui.

The issues are, how the VCL class "TGraphicControl" can be replaced by a uniGui-class. Unfortunately, all my tryings are unsuccessful.

Maybe someone can help me here.

 

Thank you very much

 

 

 

Hi,

 

You can not use all the features of TGraphicControl in web mode.

The best method is to use the TUniCanvas class for graphic.

 

Regards

Link to comment
Share on other sites

@ Patman Thanks for your answer.

 

I guess i did not understand it ...

It will not run. :(

 

Code snippet:

 

TGraphicControl:

 TLine = class(TGraphicControl)
 private
{ Private declarations }
FLineDir: TLineDirection;

function GetLineWidth: Integer;
function GetLineColour: TColor;
procedure SetLineWidth(const NewWidth: Integer);
procedure SetLineColour(const NewColour: TColor);
procedure SetLineDir(const NewDir: TLineDirection);
 protected
{ Protected declarations }
procedure Paint; override;
 public
{ Public declarations }
 published
{ Published declarations }
property Direction: TLineDirection read FLineDir write SetLineDir;
property LineColour: TColor read GetLineColour write SetLineColour;
property LineWidth: Integer read GetLineWidth write SetLineWidth;
 end;

 

= running in VCL-Mode, but in WEB-Mode a excetion "nil can not be assigned to TFont" appears

TuniCanvas:

 TLine = class(TuniCanvas)
 private
{ Private declarations }
FLineDir: TLineDirection;

function GetLineWidth: Integer;
function GetLineColour: TColor;
procedure SetLineWidth(const NewWidth: Integer);
procedure SetLineColour(const NewColour: TColor);
procedure SetLineDir(const NewDir: TLineDirection);
 protected
{ Protected declarations }
procedure Paint; override;
 public
{ Public declarations }
 published
{ Published declarations }
property Direction: TLineDirection read FLineDir write SetLineDir;
property LineColour: TColor read GetLineColour write SetLineColour;
property LineWidth: Integer read GetLineWidth write SetLineWidth;
 end;

 

= No exception, but never call the method/procedure "Paint"

 

 

Please give me a tip to solve this

 

Thanks

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...