Schlingel Posted January 5, 2013 Posted January 5, 2013 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 Quote
patmap Posted January 5, 2013 Posted January 5, 2013 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 Quote
Schlingel Posted January 11, 2013 Author Posted January 11, 2013 @ 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 Quote
lema Posted January 11, 2013 Posted January 11, 2013 You can not use regular VCL controls in Web-Mode. Also , see : http://forums.unigui.com/index.php?/topic/2074-cannot-assign-a-nil-to-tfont/ Quote
lema Posted January 11, 2013 Posted January 11, 2013 Sorry, Schlingel. My previous reply is not appropriate for your question. I thought you wanted to use TGraphicControl on Web-mode. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.