FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour a question MDI
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: a question MDI
Posted: Tue Jan 11, 2022 11:05 AM

Application

Path and name: C:\work\Errori\testMdi\testmdi.Exe (32 bits)
Size: 4,605,440 bytes
Compiler version: Harbour 3.2.0dev (r1904111533)
FiveWin version: FWH 21.11
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 3 secs
Error occurred at: 01/11/22, 12:05:27
Error description: Error BASE/1004 No exported method: EVAL
Args:
[ 1] = A {.T.} length: 1
[ 2] = N 2
[ 3] = N 746
[ 4] = N 638

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: a question MDI
Posted: Tue Jan 11, 2022 01:57 PM
Code (fw): Select all Collapse
Function test1(oWnd)
   Local oBrw,oBar, oWndClients, oMsgBar

   use customer

   DEFINE WINDOW oWndClients MDICHILD OF oWnd TITLE "Clients"

   @ 2, 0 XBROWSE oBrw OF oWndClients LINES AUTOSORT ;
         AUTOCOLS DATASOURCE "Customer" NOBORDER
      oBrw:CreateFromCode()
      oBrw:SetFocus()

      DEFINE BUTTONBAR oBar OF oWndClients 2015 SIZE 70, 60

     oWndClients:oClient = oBrw
     oWndClients:oControl = oBrw

      DEFINE MSGBAR oMsgBar OF oWndClients 2015
    oWndClients :bMoved    := { |nRow, nCol| IF(nCol < 150,oWndClients :Move(150,oWndClients :nTop),.t.) }
    oWndClients :bResized    := {||  IF(oWndClients:nLeft < 150 ,oWndClients :Move(150,oWndClients :nTop),.t.) }
    ACTIVATE WINDOW oWndClients MAXIMIZED ;
         VALID ( oWndClients := nil, .T. )
    return nil

Me faltaron los ||
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: a question MDI
Posted: Tue Jan 11, 2022 10:54 PM
cmsoft wrote:
Code (fw): Select all Collapse
Function test1(oWnd)
聽 聽Local oBrw,oBar, oWndClients, oMsgBar

聽 聽use customer

聽 聽DEFINE WINDOW oWndClients MDICHILD OF oWnd TITLE "Clients"

聽 聽@ 2, 0 XBROWSE oBrw OF oWndClients LINES AUTOSORT ;
聽 聽 聽 聽 聽AUTOCOLS DATASOURCE "Customer" NOBORDER
聽 聽 聽 oBrw:CreateFromCode()
聽 聽 聽 oBrw:SetFocus()

聽 聽 聽 DEFINE BUTTONBAR oBar OF oWndClients 2015 SIZE 70, 60

聽 聽 聽oWndClients:oClient = oBrw
聽 聽 聽oWndClients:oControl = oBrw

聽 聽 聽 DEFINE MSGBAR oMsgBar OF oWndClients 2015
聽 聽 oWndClients :bMoved 聽 聽:= { |nRow, nCol| IF(nCol < 150,oWndClients :Move(150,oWndClients :nTop),.t.) }
聽 聽 oWndClients :bResized 聽 聽:= {|| 聽IF(oWndClients:nLeft < 150 ,oWndClients :Move(150,oWndClients :nTop),.t.) }
聽 聽 ACTIVATE WINDOW oWndClients MAXIMIZED ;
聽 聽 聽 聽 聽VALID ( oWndClients := nil, .T. )
聽 聽 return nil

Me faltaron los ||



Cristobal have create a test run ok
Code (fw): Select all Collapse
function WindowChild(oWnd)
   local oWndChild
   local oFolder, oSay, oSay1
   local x
   local nPosR  := 0
   local nPosC  := 0

   if Len( oWnd:oWndClient:aWnd ) > 0
      if ( nRow + nHChild ) > oWnd:nHeight
         nRow  := 0
         if ( nCol + Int( nWChild / 2 ) ) > oWnd:nWidth
            nCol := 0
         else
            nCol += Int( nWChild / 2 )
         endif
      else
         nRow  += Int( nHChild / 4 )
      endif
   endif

   DEFINE WINDOW oWndChild MDICHILD OF oWnd ;
      FROM nRow + 1 , nCol TO nHChild, nWChild PIXEL //NOSYSMENU //BRUSH oWndCalend:oBrush  // NOCAPTION

   @ 0, 0 FOLDER oFolder OF oWndChild
   oWndChild:oClient := oFolder
   
   ACTIVATE WINDOW oWndChild ;
      ON INIT oWndChild:cToolTip := oWndChild:cCaption ;
      ON MOVE ( oWndChild:CoorsUpdate(), ;
                if( oWndChild:nLeft < 1, oWndChild:Move( oWndChild:nTop, 0 ), ), ;
                if( oWndChild:nTop  < 2, oWndChild:Move( 1, oWndChild:nLeft ), ) )

return oWndChild
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: a question MDI
Posted: Tue Jan 11, 2022 11:26 PM

Excelente!
Me alegro que lo hayas podido resolver

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: a question MDI
Posted: Thu Jan 13, 2022 12:51 PM
karinha wrote:
cnavarro wrote:Silvio, use Splitter for this
Look my sample
https://bitbucket.org/fivetech/fivewin- ... estmdi.prg



Mestre Navarro, publique un ejemplo que, cuando se compila, funciona correctamente. 驴Y d贸nde est谩 ese cami贸n lleno de BitMaps que el programa va a buscar en un directorio infinito? 驴Es posible crear un .RAR y poner a disposici贸n el SOURCE, un .EXE y los BITMAPS de este ejemplo para realizar pruebas? Sea pr谩ctico, por favor. Gracias.



Joao, no es posible publicar los bitmaps, pertenecen a microsoft y s贸lo se pueden utilizar si compilas con Visual Studio
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: a question MDI
Posted: Thu Jan 13, 2022 01:15 PM
cnavarro wrote:
karinha wrote:
cnavarro wrote:Silvio, use Splitter for this
Look my sample
https://bitbucket.org/fivetech/fivewin- ... estmdi.prg



Mestre Navarro, publique un ejemplo que, cuando se compila, funciona correctamente. 驴Y d贸nde est谩 ese cami贸n lleno de BitMaps que el programa va a buscar en un directorio infinito? 驴Es posible crear un .RAR y poner a disposici贸n el SOURCE, un .EXE y los BITMAPS de este ejemplo para realizar pruebas? Sea pr谩ctico, por favor. Gracias.



Joao, no es posible publicar los bitmaps, pertenecen a microsoft y s贸lo se pueden utilizar si compilas con Visual Studio


Est谩 bien, mi querido maestro. Necesitas aprender a compilar con BORLAND. jajajajajajajajaja, broma, broma, broma.

Regards, saludos.
Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: a question MDI
Posted: Thu Jan 13, 2022 01:17 PM

https://www.microsoft.com/en-us/downloa ... x?id=35825

Borland s贸lo para pruebas r谩pidas :D :D :D :D

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: a question MDI
Posted: Tue Jan 18, 2022 10:38 PM
Sample using Explorer Bar and MDI windows.

Code (fw): Select all Collapse
/*
Purpose : Test ExplorerBar with MDI
Author 聽: James Bott, <!-- e --><a href="mailto:jbott@compuserve.com">jbott@compuserve.com</a><!-- e -->
Company : Intellitech, gointellitech.com
Date 聽 聽: 09/28/10 13:53:39
Language: Fivewin Harbour/xHarbour
Notes 聽 :

*/


#include "fivewin.ch"
#include "color.ch"

static oWnd1, oWnd2

function main()
聽 聽local oWnd, oBar

聽 聽define window oWnd title "Test Explorerbar with MDI Windows" MDI

聽 聽define buttonbar oBar of oWnd 3d

聽 聽oWnd:oLeft:= buildExbar(oWnd)

聽 聽activate window oWnd on init Init()

return nil

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

Function Init()
聽 聽local oBar, oBar2

聽 聽define window oWnd1 mdichild ;
聽 聽 聽nominimize nosysmenu;
聽 聽 聽color CLR_BLACK,CLR_BLUE ;
聽 聽 聽of wndMain()
聽 聽activate window oWnd1 maximized

聽 聽define window oWnd2 mdichild ;
聽 聽 聽nominimize nosysmenu;
聽 聽 聽color CLR_BLACK,CLR_RED ;
聽 聽 聽of wndMain()
聽 聽define buttonbar oBar2 of oWnd2 3d
聽 聽activate window oWnd2 maximized

return nil

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

function buildExbar( oWnd )

聽 聽local oExBar, oPanel1

聽 聽oExBar = TExplorerBar():New(0,0,150,400,oWnd)

聽 聽oPanel1 = oExBar:AddPanel( "One", "c:\fwh\bitmaps\32x32\people.bmp" )
聽 聽oPanel1:lSpecial = .T.
聽 聽oPanel1:AddLink( "Providers", {|| oWnd1:maximize(), oWnd1:setfocus()}, "c:\fwh\bitmaps\16x16\additem.bmp" )
聽 聽oPanel1:AddLink( "Patients", {|| oWnd2:maximize(), oWnd2:setFocus()}, "c:\fwh\bitmaps\16x16\copy.bmp" )

return oExBar

//----------------------------------------------------------------------------//
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion