* * *

Author Topic: TRichMemo problem  (Read 553 times)

PatBayford

  • Jr. Member
  • **
  • Posts: 83
TRichMemo problem
« on: August 05, 2017, 12:17:28 am »
Hi folks, me again! I've just downloaded the latest snapshot of TRichMemo, it compiles fine, and installation appears to be OK too, BUT the component does not appear anywhere in the Component Pallette!
Anybody got any suggestion why, and how to fix it?
Lazarus 1.6.4 FPC 3.0.2 SVN 54278 Windows 10 64bit

carl_caulkett

  • Full Member
  • ***
  • Posts: 243
Re: TRichMemo problem
« Reply #1 on: August 05, 2017, 01:13:02 am »
According to the documentation, it is supposed to appear in the "Common Controls" section of the component palette. I've just downloaded and installed it on an Apple Mac, and indeed it is added to the end of the "Common Controls" section.
macOS 10.12.6
Lazarus 1.8.0 RC4
FPC 3.0.2

Phil

  • Hero Member
  • *****
  • Posts: 2302
Re: TRichMemo problem
« Reply #2 on: August 05, 2017, 01:17:25 am »
According to the documentation, it is supposed to appear in the "Common Controls" section of the component palette. I've just downloaded and installed it on an Apple Mac, and indeed it is added to the end of the "Common Controls" section.

Right, often with a package that only installs one control it doesn't make much sense to add a separate palette tab just for it, so putting it on an existing tab like Common Controls make sense. That's where I put TWebBrowser, following Dmitry's example with TRichMemo.

The only drawback is that, short of documentation, I don't know of an a way to direct the user's attention to where it was installed. You can put an readme.txt file in the list of package files, but the user would need to read it.
« Last Edit: August 05, 2017, 01:19:25 am by Phil »

PatBayford

  • Jr. Member
  • **
  • Posts: 83
Re: TRichMemo problem
« Reply #3 on: August 07, 2017, 04:28:43 am »
The register unit indeed SHOULD add it to the Common Controls tab, but in the case of my installation it does not! My palette already has some extra, custom controls in that tab - I will try removing  those and re-install in  case there is an unlisted clash.
Lazarus 1.6.4 FPC 3.0.2 SVN 54278 Windows 10 64bit

PatBayford

  • Jr. Member
  • **
  • Posts: 83
Re: TRichMemo problem
« Reply #4 on: August 07, 2017, 04:39:43 am »
Tried removing my additional controls - no difference with TRichMemo!
Lazarus 1.6.4 FPC 3.0.2 SVN 54278 Windows 10 64bit

PatBayford

  • Jr. Member
  • **
  • Posts: 83
Re: TRichMemo problem
« Reply #5 on: August 07, 2017, 10:21:18 pm »
The plot thickens - this code works - Note added the richmemo to use manually!

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  richmemo;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;
  Comp : TRichMemo;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
  Comp := TRichMemo.create(self);
  Comp.Parent := self;
  Comp.Top := 0;
  Comp.Left:= 0;
  Comp.Width:=200;
  Comp.Height:=150;
end;

end.
Lazarus 1.6.4 FPC 3.0.2 SVN 54278 Windows 10 64bit

PatBayford

  • Jr. Member
  • **
  • Posts: 83
Re: TRichMemo problem
« Reply #6 on: August 11, 2017, 11:08:01 pm »
I believe that this may be due to the use of 64 bit Windows as the OS - I installed exactly the same component on a virtual XP machine, and it works fine.
Lazarus 1.6.4 FPC 3.0.2 SVN 54278 Windows 10 64bit

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus