Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

@ 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

Posted

Sorry, Schlingel.

My previous reply is not appropriate for your question.

 

I thought you wanted to use TGraphicControl on Web-mode.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...