[Lazarus] Resource string constants support in the Object Inspector

ik idokan at gmail.com
Mon Mar 17 10:44:14 CET 2008

I find it weird a bit, but I also see the power in it.

Object Inspector assign values like property_name := value;

If you want to add some sort of language inside the Object inspector
(like %${const}$%, it will be easier to distingwish things... and if
you want litural the write the constant as follows: '%${const}$%'
inside the object inspector. (You can come out with any idea of
combination you wish).

But It scares me a bit.


On Mon, Mar 17, 2008 at 11:29 AM, Graeme Geldenhuys
<graemeg.lists at gmail.com> wrote:
> Hi,
>  In fpGUI's UI Designer I'm trying to come up with an idea to add
>  support for resource strings in the Object Inspector. If I can come up
>  with a good enough idea, I will to try and implement it in Lazarus as
>  well (if my knowledge of Lazarus IDE is good enough), otherwise I add
>  it as a feature request.
>  Here is an example under fpGUI, but the same issue applies to
>  Lazarus's LCL based applications.
>  Take a TfpgButton.Text property as an example.  If you type 'rsToday'
>  without the quotes in the text property, the UI Designer will generate
>  the code
>   with SomeButton do
>   begin
>     ...
>     Text := 'rsToday';
>     ...
>   end;
>  Which means it's going to display 'rsToday' on the button and not the
>  resource string value of rsToday.
>  How can we let UI Designer distinguish between a string literal and a
>  resource string constant?
>  My first thought was to do something like the named font or named
>  color support in fpGUI. Add a '#' character in the front. The UI
>  Designer would check the first character and if it's a #, write it as
>  a resource string instead of plain text.  Instantly that idea failed
>  because I have a StringGrid in my application with columns titles like
>  '#1', '#2' etc...
>  Any other thoughts? Is something like this even possible in Lazarus,
>  or will the usage of TReader/TWriter fail with resource string
>  constants.  fpGUI's UI Designer generates actual Object Pascal code,
>  so might be easier to implement than Lazarus *.lfm files.
>  Regards,
>   - Graeme -
>  _______________________________________________
>  fpGUI - a cross-platform Free Pascal GUI toolkit
>  http://opensoft.homeip.net/fpgui/
>  _______________________________________________
>  Lazarus mailing list
>  Lazarus at lazarus.freepascal.org
>  http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


More information about the Lazarus mailing list