2011/11/13 Bruce Bruen <bbr...@paddys-hill.net>: > On Sun, 2011-11-13 at 03:01 +0100, Benoît Minisini wrote: > >> Hi Bruce, >> >> I took at a look at your code. You made a big mistake by making your >> controls inherit UserContainer, whereas they are not containers. Which >> makes the IDE mad when you want to use _DrawWith or some other properties. > > > Yes, that makes sense. > > >> They must inherit UserControl. > > > I used UserContainer in gb2 for some reason lost in the mists of time, I > think it was to do with a "handy" property in the UserContainer that was > not in UserControl. > > I thought that maybe the reason has "gone away" now so I retried the > LabelTextBox inheriting UserControl. However, I have struck a problem - > I can't seem to restrict the Height value if my control is used inside a > container that enforces it's own height. For example, if the > LabelTextBox is inside a HBox it's height will expand to the HBox > height. I realise that this is what is "supposed to happen" but it's > not what I "want to happen". > > I have attached two screen shots showing my problem. well it's not a problem from gambas :)
you must add more containers to achieve what you want to do : HBox |__ VBox(expanded) | |__ hBox | | |__ Label | | |__ SpecialTexBox(expanded) | |__ Panel(expanded) |__ Picture this is how gambas containers works > > I don't know why my intentions work when inheriting UserContainer and > not when inheriting UserControl. I'll look into this further this week > to see if I can characterise it properly. your widget are usercontrol ... not containers ... that have no need to work like a panel or anything on this ype > >> Or maybe I didn't understand what you >> want to achieve at all! > > > The intent is to give my two volunteer designers/coders with > "simplified" controls that: > - behave in terms of "navigation" the same way in both QT4 and GTK+ that is the work of benoit and gambas > - provide some extra properties (e.g. the label) that can be set in the > IDE and thus reduce both design and coding time you have just to export it and setup the _properties constant > - subsume the various native events (Activate, Click, Change etc) into a > single "Changed" event that is only raised when the user has finished > altering the value content of the controls ok > - ( and at stage two), to build some "data aware" controls - like > gb.gb.form - but which will work with some standardised "business > object" classes. ??? don't understand( that is already what gb.db.form do ... no ?) > > regards > Bruce > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- Fabien Bodard ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user