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
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus