[Gambas-devel] Question about _DrawWith

Benoit Minisini gambas at ...1...
Sat Apr 12 20:56:57 CEST 2008


On samedi 12 avril 2008, Robert Rowe wrote:
> Thank you for writing the guide for creating components. It is very
> helpful. Could you elaborate on the _DrawWith constant a bit more? You
> didn't provide an example in the guide. I tried this:
>
> Public Const _DrawWith As UCToolbar = Me
>
> and got a Bad Constant Type error. I also tried variations:
>
> Public Const _DrawWith As Object = Me
> Public Const _DrawWith As FToolbar = $hFToolbar  'FToolbar is a form
> whose parent is Me
> Public Const _DrawWith As Object = $hFToolbar
>
> All give the same error. Also the autocomplete menu doesn't list _DrawWith.
>
> I'm using revision 1306.
>
> Robert Rowe
>

It is a string constant. For example, _DrawWith = "TextBox".

But I suggest not using it at the moment, and let the IDE draws its default 
DrawingArea.

Note that the IDE never load any component you check in the project property 
dialog, and so does not see their code at all. The only exception is the 
components it already uses for running: gb.qt, gb.form and gb.form.mdi.

As for the autocompletion, it never shows symbols beginning with an 
underscore.

Regards,

-- 
Benoit Minisini




More information about the Devel mailing list