Forum > Beginners
Hint Fontsize
seghele0:
Unbelievable how supportive you all are.
This forum is therefore not only for professional programmers, but also for beginners who still have a lot to learn.
:)
The example with "constructor" can't increase the font size!
Maybe Lazrus hasn't been modified or enabled yet and it probably only works in Delphi. :(
This is a challenge for the professionals
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---unit Unit1;{$mode objfpc}{$H+}interfaceuses Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls;type { TForm1 } TForm1 = class(TForm) Button1: TButton; Label1: TLabel; Label2: TLabel; SpeedButton1: TSpeedButton; procedure FormCreate(Sender: TObject); private // public // end;var Form1: TForm1;implementation{$R *.lfm}{ TForm1 }Type TOKHint = class(THintWindow) constructor Create(AOwner: TComponent); override; end; constructor TOKHint.Create(AOwner: TComponent);begin inherited Create(AOwner); with Canvas.Font do begin Alignment := taCenter; Name := 'Arial'; //'Times New Roman'; Height := 18; Style := [ fsBold ]; color := clBlack; //clYellow; end;end; procedure TForm1.FormCreate(Sender: TObject);begin HintWindowClass := TOKHint; Application.HintColor := clYellow;//clBlue; Application.ShowHint := True;end;end. :-X
********************************
Next works well.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---unit Unit1;{$mode objfpc}{$H+}interfaceuses SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons;type { TForm1 } TForm1 = class(TForm) Label1: TLabel; SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton; procedure FormCreate(Sender: TObject); private // public // end;var Form1: TForm1;implementation{$R *.lfm}{ TForm1 } procedure TForm1.FormCreate(Sender: TObject);begin Screen.HintFont.Color := clRed; Screen.HintFont.Name := 'Arial'; //'Courier New'; Screen.HintFont.Size := 14; Screen.HintFont.Style := [fsBold]; Application.HintColor := clYellow; SpeedButton1.Hint :='First line ...' +#13+ 'Second line ...'; SpeedButton2.Hint :='SPButton2 line ...' +#13+ 'Second line ...'; Application.ShowHint:= True;end;end. ;) Thanks for the helpful code.
Navigation
[0] Message Index
[*] Previous page