[Gambas-user] GB3 Custom controls

Bruce Bruen bbruen at ...2308...
Mon Nov 7 05:29:09 CET 2011


I thought I had figured out all the secrets, but no.

This is about custom controls (hereafter "CC") written in gambas.

What I've found out so far
1) Declaring one of the hidden constants with the value set to the
default causes problems, e.g. _IsContainer=False
2) (Related) Don't use the _DrawWith constant without care as it will
crash the IDE if the form is left open.
3) The Controls directory containing the icons now has to go under the
Project directory and migrating a GB2 project doesn't move them. 
4) It would be really, really nice if IsContainer was a RO property
exposed by all controls
5) It would be really, really, really nice if all controls had a
AcceptFocus property (IDE visible) so things like Picture boxes can be
skipped in custom navigation code
6) The IDE now makes testing a custom control library project really
easy, except:
    a) it doesn't display the controls like they would appear in the
finished product.
    b) the gb problem of having to reload the project if a new CC class
is added still seems to exist.
7) Issue # 123 GUI dependencies in library projects not exposing any gui
dependency is a real pain.
...and about a gazillion things about the differences in behaviour
between gtk and qt4 (but they are not gambas problems).

So I have now partially converted my first level CC library from gb2 to
gb3 and its real good!
But what do I do now?  How do I make it useable in the IDE?
(Apart from 7 above I don't consider any of these to be gambas 3
issues.)

I have figured out that I can see the CC's in a form (*) in the IDE if I
add the CC component to the IDE and recompile it (well actually, ran it
inside itself).  And they look real good and are displayed as they will
in the finished product (allowing for the visual difference b/n QT4 and
GTK).  But the controls don't show up in the toolbox??

(*) Done by importing a GB2 project "mocked up" to use the GB3 CC
library control names

I have tried sticking the library executable and the library.component
file in /usr/local/gambas3 but that achieves nothing.
I have tried sticking the library executable in /usr/bin with no joy.

Would some of you nice people tell me what it is that I haven't done,
please.

I have attached a mockup of (part of) the library. But I don't think I
have missed anything in the code???

Bruce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phCCDemo-0.0.100.tar.gz
Type: application/x-compressed-tar
Size: 58246 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20111107/e757a194/attachment.bin>


More information about the User mailing list