[Gambas-devel] gb.form.mda-0.2.tar.gz

Ron Onstenk ronstk at ...124...
Tue Aug 1 18:46:56 CEST 2006


On Tuesday 01 August 2006 13:38, Fabien Bodard wrote:
> it is very confusing as ron talk about an object and .container is not an
> object but a parent clas that give to an object some properties.

Explain?
I did mean 'Container' and not '.container', that are different things.

A Frame ('gb.qt.Frame') inherits the 'gb.qt.Container' and there is no
Frame.container but there is a Frame.Children and this in the help lead to

Container.Children (gb.qt)
Syntax
PROPERTY READ Children AS .ContainerChildren

So the named 'Frame.Children' is in real 'Frame.container' and is actual 'gb.qt.Container.Children'
Looks to me as name mangle and very confussing.

My code idea is next example:

Sub Add(hForm as form,bResize as boolean) 
  ' add Feditor as hForm in next sub in container with buttons and more.

  MyWin = New Container(Scrollview1)
  MyTitle = New Label(MyWin) 
  MySubForm = New Form(MyWin)

  ' the hForm should be placed in the place of MySubForm
  ' How? The help does not tell it for Reparent

  ' Control.Reparent (gb.qt)
  ' What is Control?
  ' Here the reason I talk about 'Object'

  ' The help should say <Object>.Reparent (gb.qt) while 
  ' the object is the thingy (object) having .Reparent and that is Form 
  ' in this case but could also be 'ListView' and that is well known as 
  ' Control and 'Form' is the container for those controls.

  ' Beside of that in the help "This class inherits Window" and not
  ' "This class inherits Control" so .Reparent can't on a Form or
  ' Control.Reparent is wrong and should be <thingy>.Reparent
  ' Fabian does not understand the object as pointer to thingy :) (smile)

  ' Roulette to get the correct one
  hForm.Reparent(hForm as MySubForm,0, myTitle.Height)
  ' or
  hForm.Reparent(MySubForm as hForm,0, myTitle.Height)
  ' or
  MySubForm.Reparent(hForm as MySubForm,0, myTitle.Height)
  ' or
  MySubForm.Reparent(MySubForm as hForm,0, myTitle.Height)

  ' add buttons and etc
  ....
  ' place all at right place and size
  ....
  'done 
END

Anyway the help say for Container 'This class is not creat(e)able ' 
and then I can't use it. :( 


I give up, Benoit please tell me what should I use as container.


Ron

PS
I wish we had a object hierarchy of the controls
http://doc.trolltech.com/3.3/classchart.html
http://doc.trolltech.com/extras/qt41-class-chart.pdf
ftp://ftp.trolltech.com/qt/pdf/qt33-class-chart.pdf

Same for the Database Component.
http://www.info-3000.com/access/daoreferencecomplete.php
Just to get the idea.






More information about the Devel mailing list