[Gambas-devel] New MDI Control

Ron Onstenk ronstk at ...124...
Sun Jun 25 16:25:55 CEST 2006


On Sunday 25 June 2006 03:02, Fabien Bodard wrote:
> Hi to all,

---8<---- 

> Nevertheless... If Many people can test my component ...it while be great.
I could not wait, did try it direct. :)

> 
> Just copy the project in Gambaspath/comp/src and add "gb.form.mda" in 
> the 'order' file.
Perfect
> 
> do a make install
Perfect
> 
> Change componant gb.form.mdi by gb.form.mda
Hm, Perfect again
> 
> That's all.
???
> 
> Regards,
> Fabien Bodard
> 
> 
> Return me all bug you see please !
What bugs? didnot found yet :)

> 

Good job Fabien.
I like it this way.

I think you know about the Cascade/Tile not working yet, this not a bug I assume.

The only thing I found and that is not a bug in sense it harms anything.
Moving the window to the left stops when the border left hits the project Sidepanel.
When the window is to big, normal (for me) is go to the right bottom corner and resize it.
If this point is not visible then drag the window with the Top to the left/up.

Try at least to make then Cascade (and/or Tile) working so all open windows 
place themself in the visible windows say width/height at 50 %

Any way I will switch over to your version. 
Thanks

Ron

PS Good job in compiling too.
Your version consumes 1 byte less the version of Benoit :) :) :)

PSS 
One point. If maximised and click on the topbar of the window a flicker occurs.


PSSS
This in FWorkspace.class works at me :)

PUBLIC SUB MnuCascade_Click()
  DIM iCCwidth AS Integer
  DIM iCCheight AS Integer
  DIM xw AS window
  DIM off AS Integer
  iCCwidth = ME.ClientWidth \ 2
  iCCheight = ME.ClientHeight \ 2
  off = 0

  FOR EACH xw IN $aWindow
    xw.Width = iCCwidth
    xw.Left = off
    xw.Height = iCCheight
    xw.Top = off
    off += 24
  NEXT
END

PUBLIC SUB mnuTile_Click()
  DIM iCCwidth AS Integer
  DIM iCCheight AS Integer
  DIM xw AS window
  DIM off AS Integer
  DIM offx AS Integer
  DIM offy AS Integer
  DIM ix, iy AS Integer
  
  off = $aWindow.Count
  SELECT off
    CASE 0
      RETURN
    CASE 1 
      offx = 1  
      offy = 0
    DEFAULT  
      offx = Sqr($aWindow.Count)
      offy = offx + 1
  END SELECT
    
  iCCwidth = ME.ClientWidth \ IIf(offx = 0, 1, offx)
  iCCheight = ME.ClientHeight \ IIf(offy = 0, 1, offy)

  FOR ix = 0 TO offx - 1
  FOR iy = 0 TO offy - 1
    IF (iy * offx + ix) < off THEN
      xw = $aWindow[iy * offx + ix]
      xw.Width = iCCwidth
      xw.Height = iCCheight
      xw.Left = iCCwidth * ix
      xw.Top = iCCheight * iy
    ENDIF  
  NEXT
  NEXT

END






More information about the Devel mailing list