[Gambas-user] _DrawWith Me ? trying to view custom controls in the IDE

Bruce adamnt42 at gmail.com
Sat Feb 20 07:41:33 CET 2021


On 20/2/21 3:13 pm, Bruce Steers wrote:
> I'm chugging away chewing on making a custom control.
> 
> I call it Tickbox
> It's a CheckBox but uses a picture for the tick and can set text to left or
> right.
> 
> My discovery though that's a bit naff...
> Unless i add the control to gb.form and compile it in it's not very good to
> use.
> 
> I'm sure you know what i mean.
> _DrawWith works great for a copy of an existing control in displaying it
> but not a new one.
> 
> something like _DrawWith = "Me" would be good.
> 
> If i copy the class into gb.form source folder and compile it then works
> all as expected.
> 
> The 2 attached snapshots is what i refer to. one shows the control as a
> class but in the normal gambas, te other where i've added the control to
> gb.form.
> 
> Is there nothing can be done to get the custom controls visible?
> i've had to make a branch and have a custom gb.form to work with and keep
> installing/reinstalling just to get the control useable (in the IDE).
> the control works and shows fine when i launch the app, it's just the IDE
> won't play ball :(.
> 
> Thanks for any pointers if i'm missing something.
> 
> BruceS
> 
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 

I doubt it. We had a go some years back and it proved to be not worth 
the effort. The way the Form Designer handles DrawWith I now cannot 
recall. Most times we just use the nearest enclosure box to give some 
idea as to the custome control content. YMMV but giventhe "elasticity" 
of the form designer vs the form as displayed at runtime I found more 
value in getting the control's "working code" right rather then how it 
looks in the form designer.

Nonetheleless it's good to see someone else that wants a left labelled 
checkbox. We also have a left labelled radiobutton. I don't know how or 
why the idea of right labelling these things became a "design standard" 
but ISMTT! (Work that one out by yourself).
regards
bruce


More information about the User mailing list