Page 1 of 1

explorerBar y MDI

Posted: Fri May 06, 2011 9:26 pm
by sysctrl2
TExplorerBa y ventana MDI no funciona,
Image

Uploaded with ImageShack.us

Code: Select all

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4
   local bClick := { | o | MsgInfo( o:GetText() ) }
      
   DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar" MDI
   
   oWnd:SetSize( 350, 600 )

   oExBar = TExplorerBar():New()

   oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
   oPanel1:lSpecial = .T.
   oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
      
   oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
   oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )

   oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
   oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   
   oPanel4 = oExBar:AddPanel( "Four" )
   oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )

   oWnd:oClient = oExBar

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

Re: explorerBar y MDI

Posted: Fri May 20, 2011 9:02 pm
by Daniel Garcia-Gil
Hola

el punto es que los mensajes no llegan al objeto oWnd, sino al frame que se crea por el entorno MDI, entonces colgemos del alli la explorer y controlamos manualmente le tamaño con el resize

Code: Select all

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4
   local bClick := { | o | MsgInfo( o:GetText() ) }
   local oPanel
   
      
   DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar" MDI
   
   oWnd:SetSize( 350, 600 )

   oExBar = TExplorerBar():New( , , , , oWnd:oWndClient)

   oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
   oPanel1:lSpecial = .T.
   oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
      
   oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
   oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )

   oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
   oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   
   oPanel4 = oExBar:AddPanel( "Four" )
   oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )


   oWnd:bResized = { | nType, nWidth, nHeight | if( nWidth != NIL, oExBar:move( , , , nHeight ), ) }
  

   ACTIVATE WINDOW oWnd

return nil

Re: explorerBar y MDI

Posted: Fri May 20, 2011 10:48 pm
by sysctrl2
Daniel, agradezco tu pronta respuesta,

ha mejorado un poco, pero al mover de lado la MDI CHILD, o incluso al maximinizarla, deja un efecto raro manchado sobre la texplorerbar,
saludos..
[URL=http://imageshack.us/photo/my-imag ... .jpg[/img]

Uploaded with ImageShack.us[/url]

Re: explorerBar y MDI

Posted: Sat May 21, 2011 12:11 am
by Daniel Garcia-Gil
Hola

entonces no invadamos nosotros el espacio del MDI y dejemosle el trabajo a fivewin

Code: Select all

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4
   local bClick := { | o | MsgInfo( o:GetText() ) }
   
      
   DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar" MDI
   
   oWnd:SetSize( 350, 600 )
   
   oExBar = TExplorerBar():New( , , , , oWnd )

   oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
   oPanel1:lSpecial = .T.
   oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
      
   oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
   oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )

   oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
   oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   
   oPanel4 = oExBar:AddPanel( "Four" )
   oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
  
   oWnd:oLeft = oExBar

   ACTIVATE WINDOW oWnd 

return nil
 

Re: explorerBar y MDI

Posted: Sat May 21, 2011 9:52 am
by Silvio
the best way is to use the tfsdi class of José Luis Sánchez Navarro

Re: explorerBar y MDI

Posted: Sat May 21, 2011 6:44 pm
by sysctrl2
Excelente, Daniel,
ya funciona, gracias.

Re: explorerBar y MDI

Posted: Sat May 21, 2011 6:50 pm
by sysctrl2
Mr. Silvio,

my idea is to use only FWH.

GRACIAS.

Re: explorerBar y MDI

Posted: Sun May 22, 2011 6:08 am
by Francisco Horta
cesar,
y donde le puedo cambiar el ancho a la explorerbar?
saludos
paco

Re: explorerBar y MDI

Posted: Mon May 23, 2011 8:12 am
by Silvio
sysctrl2,

Tfsdi i a only FWH DIALOG style .nor. 4 !!!! (no border)
you can insert explorerbar a t left and grid at right and it run ok good