[Gambas-user] Custom Control
D. L. Fox
ubuntu at ...2332...
Sun Nov 29 19:12:46 CET 2009
Kadaitcha Man wrote:
> You don't need to know C. Simply inherit the control in
> Gambas code then wrap your methods and properties around it.
DOH! I should have thought of that. <insert lame excuse here> Thanks!
Either I've found a bug, or I'm not doing something right. The doc says:
"To provide the icons of your component controls, you must create a
/control directory at the root of your project, and put one PNG file for
each control icon in it.
The name of a control icon must be the class name of the control in
lower case with the .png extension."
I tried that but it just shows a black question mark in the IDE panel
when I load the component. The component itself works as expected. Are
there any other requirements needed of the icon? I'm currently using a
32 x 32 PNG file, named in all lowercase the same as the component. I'm
running Gambas3 on Ubuntu 9.10.
Am I allowed to use *optional* arguments in the _new sub of the
component? Or am I not suppose to pass arguments to _new?
I know I have to pass the name of the parent container when I use it at
runtime. I currently have it working using arguments in the _new sub and
passing the parent name at the end of the argument list. However, the
last argument I was using is *optional*. If I leave the optional
argument empty, the IDE says the parent name is 'unexpected'. If I pass
Null as the optional argument just prior to the parent name, naturally
it's the wrong data type for the argument. I'm probably missing
something obvious again. Go ahead and smack me.
More information about the User
mailing list