Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-03

fpGUI - UI Designer - place own components ?

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter Krawies

Hi,

yesterday I tried fpGUI the first time - I only compiled the examples just to see how it looks.

Now I "google and google" for an answer to the question,

how to make descendants from the fpGUI visual components and then place my own derived Components
into the component palette of the UI Designer.

Is that possible - at all ?

Thanks,
Peter

Graeme Geldenhuys
to Peter Krawies
Peter Krawies wrote
how to make descendants from the fpGUI visual components

To create new widgets/components, pick a base component that is close to what you need, or descend from TfpgWidget (in the fpg_widget.pas unit).

and then place my own derived Components into the component palette of the UI Designer.

In the UI Designer project all widgets that appear on the component palette is registered in the vfdwidgets.pas unit in the RegisterWidgets() procedure. Looking at the existing ones the code should be self explanatory.

Alternatively (in a pinch) you can simply use the TOtherWidget at the end of the component palette. When you drop that on your form it will prompt you for the actual Widget Class to use. You will not see your actual widget in the designer form - only a green rectangle, but when you compile and run your app, it should appear as it should. When you use TOtherWidget, you use the "Unknown Lines" memo in the Object Inspector to specify any property values.

You can also integrate the fpGUI UI Designer into Lazarus, MSEide or any other programmer editor via their External Tools functionality.

For quicker and more fpGUI specific support, may I suggest you use the official fpGUI support newsgroup to post questions. You can use a dedicated NNTP news client, or the web interface. Here is a URL to give you all the details.

http://fpgui.sourceforge.net/support.shtml

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
Tomas Hajny
to Graeme Geldenhuys

The original poster is not subscribed to the list (although he hasn't mentioned it in his post), so I included him in Cc: now.

Tomas

Graeme Geldenhuys wrote 35 lines
On 2015-03-05 08:42, Peter Krawies wrote: > how to make descendants from the fpGUI visual components To create new widgets/components, pick a base component that is close to what you need, or descend from TfpgWidget (in the fpg_widget.pas unit). > and then place my own derived Components > into the component palette of the UI Designer. In the UI Designer project all widgets that appear on the component palette is registered in the vfdwidgets.pas unit in the RegisterWidgets() procedure. Looking at the existing ones the code should be self explanatory. Alternatively (in a pinch) you can simply use the TOtherWidget at the end of the component palette. When you drop that on your form it will prompt you for the actual Widget Class to use. You will not see your actual widget in the designer form - only a green rectangle, but when you compile and run your app, it should appear as it should. When you use TOtherWidget, you use the "Unknown Lines" memo in the Object Inspector to specify any property values. You can also integrate the fpGUI UI Designer into Lazarus, MSEide or any other programmer editor via their External Tools functionality. For quicker and more fpGUI specific support, may I suggest you use the official fpGUI support newsgroup to post questions. You can use a dedicated NNTP news client, or the web interface. Here is a URL to give you all the details. http://fpgui.sourceforge.net/support.shtml Regards, - Graeme -