🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.components.writing
Article #43

Re: Database property

#43
From: Eugene I Levin -- remove "nospam...
Date: Thu, 10 Jul 1997 00:00
33 lines
1500 bytes
On Thu, 10 Jul 1997 Marc Scheuner wrote:

> I'm trying to get my own component to display the list of valid
> database names in a property. 
> 
> It works nicely in the TQuery object, so I assume there's a ready-made
> property editor around for it, but I haven't been able to track it
> down. 

Well, I do not know about "a ready-made property editor around for it",
but it looks NABFD to write your own. Just derive your PE form
TPropertyEditor, include paValueList in the attributes, and override
GetValues. Something like this:

procedure TDBNamePropertyEditor.GetValues(Proc: TGetStrProc);
var
 L: TStringList;
 i: integer;
begin
  Session.GetAliasNames(L);
  for i := 0 to L.Count - 1 do
    Proc(L.Strings[i]);
end;

HTH,
--
Eugene I Levin
Bielefeld, Germany

I'm sorry for coding my Email in the header.
Here is the right one:
L e v i n @ l h . b i c o s . d e
Technical Details
Message-ID: <33c53ce0.6551045@news.bicos.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <33c4d9c3.25441422@news.bernoise.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 112b07,4c92e2c3b96adda5
X-Google-Attributes: gid112b07,public
X-Google-Thread: fe2ce,4c92e2c3b96adda5
X-Google-Attributes: gidfe2ce,public
From: Levin@lh.bicos.de.nospam.com (Eugene I Levin -- remove "nospam.com" to reply!)
Subject: Re: Database property
Date: 1997/07/10
Message-ID: <33c53ce0.6551045@news.bicos.de>
X-Deja-AN: 256028940
References: <33c4d9c3.25441422@news.bernoise.ch>
Reply-To: Levin@lh.bicos.de.nospam.com
Newsgroups: comp.lang.pascal.delphi.components.writing,borland.public.delphi.vcl.components.writing