<div><div dir="auto">Make stringgrid1 a pointer and put TMyStringGrid in the implementation section?</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op do 7 mrt. 2019 om 09:11 schreef Dennis <<a href="mailto:dec12@avidsoft.com.hk">dec12@avidsoft.com.hk</a>><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">unit frproxyserver;<br>
<br>
{$mode objfpc}{$H+}<br>
<br>
interface<br>
<br>
uses<br>
   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, Grids,<br>
   frBase;<br>
<br>
type<br>
<br>
   TMyStringGrid=class(TStringGrid) //how to I make this class visible <br>
only to this unit?<br>
   public<br>
   end;<br>
<br>
   { TProxyServerFrame }<br>
<br>
   TProxyServerFrame = class(TBaseFrame)<br>
     Panel_Top: TPanel;<br>
     StringGrid1: TMyStringGrid;<br>
   private<br>
<br>
   public<br>
<br>
   end;<br>
<br>
implementation<br>
<br>
{$R *.lfm}<br>
<br>
end.<br>
<br>
=============<br>
My reason is I don't want to pollute the name space but if I put the <br>
declaration of TMyStringGrid in the implementation section, it cannot be <br>
used by the field in the class declaration of TProxyServerFrame.<br>
<br>
if there a compiler directive that I can put around<br>
TMyStringGrid to make it only visible to the unit frproxyserver?<br>
<br>
Dennis<br>
_______________________________________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></blockquote></div></div>