[Gambas-user] Custom control not appearing in toolbox

B Bruen bbruen at ...2308...
Wed May 7 06:20:06 CEST 2014


On Mon, 5 May 2014 21:13:25 -0700 (PDT)
VonZorch <VonZorch at ...626...> wrote:

> I developed a custom control.  I followed the instructions on the How to
> Program Components In Gambas page.  It works correctly and can be selected
> from the project properties dialog.  It can be created in code but I cannot
> get it to appear on the IDE toolbox.   SpeedListBox.gz
> <http://gambas.8142.n7.nabble.com/file/n46335/SpeedListBox.gz>   that link
> should be the source archive and installer.
> There are png icons files in the correct place using two variations of the
> class name.
> Can someone shed a little light on this problem?

You cannot inherit UserControl as you are already inheriting Form.  See comp/source/gb.form ColorChooser (and FColorChooser) for a good example of how to use a form to design a custom control.

Your control can use a form as you intend to "design" the control, but the actual exported control must either inherit from UserControl or UserContainer (or some other control) in order to work properly.

hth
-- 
B Bruen <bbruen at ...2308...>




More information about the User mailing list