Error on Folder class or bug

Error on Folder class or bug

Postby Silvio.Falconi » Fri Nov 21, 2014 10:24 am

Please see this picture :
http://www.eoeo.it/wp-content/uploads/2014/11/test.jpg

Image

I'm trying to make a new visualization of my application

It is a simply dialog ( Style ws_child ) insert on a Window
At left there is a simply grid ( xbrowse) and at Right an Folder

When I insert a say and get control on this folder I have problem to show these controls ( see the get controls)

the x,y and the size are not as i have on my old dialog ...and I see lines on the get controls..... Why ?

I tried with Tfolder and TfolderEx
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error on Folder class or bug

Postby Antonio Linares » Fri Nov 21, 2014 12:48 pm

Silvio,

Please provide a self contained example. Thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41922
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error on Folder class or bug

Postby Silvio.Falconi » Fri Nov 21, 2014 7:09 pm

I sent you now
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error on Folder class or bug

Postby Antonio Linares » Sat Nov 22, 2014 6:38 am

Silvio,

I need a small and self contained example. I am not going to debug your app. That is your work :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41922
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error on Folder class or bug

Postby Silvio.Falconi » Sat Nov 22, 2014 7:23 am

this is a self contained !!!
to recreaste the error it need of that prg and that class
I saw it come when I add recource windows xp theme
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error on Folder class or bug

Postby Antonio Linares » Sat Nov 22, 2014 7:33 am

Three large PRGs are not a self contained example :-(
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41922
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error on Folder class or bug

Postby Silvio.Falconi » Sat Nov 22, 2014 7:50 am

Antonio,
here there 'is a self smaller test


on folder test
add resource theme to rc file 1 24 "WindowsXP.Manifest"
add customer .dbf



Code: Select all  Expand view


#include "fivewin.ch"
#include "xbrowse.ch"



Function Main()
Local oWndMain,oBar

DEFINE WINDOW oWndMain   ;
      TITLE "TEST"

SET MESSAGE OF oWndMain TO "TEST" CENTER NOINSET

DEFINE BUTTONBAR oBar _3D SIZE 44, 46 OF oWndMain

DEFINE BUTTON OF oBar ;
      RESOURCE "BB1"       ;
      ACTION TEST(oWndMain,oBar)

ACTIVATE WINDOW oWndMain maximized
return nil


//-------------------------------------------------//
function Test(oWndMain,oBar)

   local oDlg, oGrid, oFont,oCont,oTab,oSplit
   Local  aClient := GetClientRect (oWndMain:hWnd )
   Local nSplit := 102
   Local nGridBottom,nGridRight


  USE CUSTOMER ALIAS CU


   DEFINE DIALOG oDlg
   oDlg:nTop    = oBar:nHeight
   oDlg:nLeft   = 0
   oDlg:nBottom = aClient[3] - 1
   oDlg:nRight  = aClient[4]
   oDlg:nStyle  := nOR( WS_CHILD, 4 )
   oDlg:SetColor( CLR_WHITE, GetSysColor(15) )
   nGridRight := (oDlg:nRight / 2 )
   nGridBottom:= (oDlg:nBottom / 2) - oBar:nHeight
   nOrder := 1

   oGrid := TXBrowse():New( oDlg )
   oGrid:nTop    := 00
   oGrid:nLeft   := nSplit+2
   oGrid:nBottom := nGridBottom
   oGrid:nRight  := nGridRight


    aBrowse   := { { { || CU->FIRST }, i18n("Nombre"), 150, 0 },;
                  { { || CU->LAST  }, i18n("Appellidos"), 150, 0 },;
                  { { || CU->STREET}, i18n("Direccion"), 150, 0 },;
                  { { || CU->CITY } , i18n("Localidad"), 150, 0 } }


     FOR i := 1 TO Len(aBrowse)
      oCol := oGrid:AddCol()
      oCol:bStrData := aBrowse[ i, 1 ]
      oCol:cHeader  := aBrowse[ i, 2 ]
      oCol:nWidth   := aBrowse[ i, 3 ]
      oCol:nDataStrAlign := aBrowse[ i, 4 ]
      oCol:nHeadStrAlign := aBrowse[ i, 4 ]
   NEXT



  oGrid:SetRDD()
  oGrid:CreateFromCode()
  oGrid:bChange  := { || RefreshCont(oCont,"CU") }



 @ 0,  0  FOLDER  oCont OF oDlg  SIZE nSplit-10, nGridBottom PIXEL  ;
                   PROMPT  "Dati","Rapporti commerciali","Varie"

//@ 130,45 button "test for dialog"  of oCont:adialogs[1] action Dialog_1( .t. )  PIXEL


    @ nGridBottom, nSplit+2 TABS  oTab ;
     OPTION nOrder SIZE oWndMain:nWidth()-80, 12 PIXEL OF oDlg ;
     ITEMS i18n(' First '), i18n(' Last ')



    oSplit := TSplitter():New(00,nSplit,(.not..F.) .or. .T.,{oCont},.not..F.,;
                                    {oGrid,oTab},.not..F., , ,;
                                    oDlg,,1,nGridBottom + oTab:nHeight,;
                                    .T.,.T.,,.F.,.T.,.T. )


    ACTIVATE DIALOG oDlg NOWAIT ;
    ON INIT  RefreshCont( oCont,"CU")

   return nil


     FUNCTION RefreshCont( oCont,cdbf)

   local nRecPtr :=(cdbf)->(RecNo())
   local nOrden  := (cdbf)->(OrdNumber())

   LOCAL cFirst
   LOCAL cLast
   LOCAL cStreet
   LOCAL cCity
   LOCAL cState
   LOCAL cZip
   LOCAL dHiredate
   LOCAL lMarried
   LOCAL nAge
   LOCAL nSalary
   LOCAL cNotes

   Local oDlg := oCont:adialogs[1]
   Local   oFont


   cFirst    := (cdbf)->FIRST
   cLast     := (cdbf)->LAST
   cStreet   := (cdbf)->STREET
   cCity     := (cdbf)->CITY
   cState    := (cdbf)->STATE
   cZip      := (cdbf)->ZIP
   dHiredate := (cdbf)->HIREDATE
   lMarried  := (cdbf)->MARRIED
   nAge      := (cdbf)->AGE
   nSalary   := (cdbf)->SALARY
   cNotes    := (cdbf)->NOTES


    DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 8


   @ 12, 10 SAY "First:" OF oDlg SIZE 14, 8 PIXEL FONT oFont
   @ 10, 43 GET cFirst    OF oDlg SIZE 105, 12 PIXEL FONT oFont

   @ 26, 10 SAY "Last:" OF oDlg SIZE 14, 8 PIXEL FONT oFont
   @ 24, 43 GET cLast     OF oDlg SIZE 105, 12 PIXEL FONT oFont

   @ 40, 10 SAY "Street:" OF oDlg SIZE 19, 8 PIXEL FONT oFont
   @ 38, 43 GET cStreet   OF oDlg SIZE 155, 12 PIXEL FONT oFont

   @ 54, 10 SAY "City:" OF oDlg SIZE 13, 8 PIXEL FONT oFont
   @ 52, 43 GET cCity     OF oDlg SIZE 155, 12 PIXEL FONT oFont

   @ 68, 10 SAY "State:" OF oDlg SIZE 17, 8 PIXEL FONT oFont
   @ 66, 43 GET cState    OF oDlg SIZE 15, 12 PIXEL FONT oFont

   @ 82, 10 SAY "Zip:" OF oDlg SIZE 11, 8 PIXEL FONT oFont
   @ 80, 43 GET cZip      OF oDlg SIZE 55, 12 PIXEL FONT oFont

   @ 96, 10 SAY "Hiredate:" OF oDlg SIZE 28, 8 PIXEL FONT oFont
   @ 94, 43 GET dHiredate OF oDlg SIZE 44, 12 PIXEL FONT oFont



   oCont:refresh()

   RETURN nil





 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error on Folder class or bug

Postby Antonio Linares » Mon Nov 24, 2014 4:03 am

Silvio,

Simply increase the size of the SAY and GET controls :-)

@ 12, 10 SAY "First:" OF oDlg SIZE 19, 13 PIXEL FONT oFont
@ 10, 43 GET cFirst OF oDlg SIZE 110, 17 PIXEL FONT oFont

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41922
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error on Folder class or bug

Postby Silvio.Falconi » Mon Nov 24, 2014 8:04 am

yes of course..I allready arrived on this solution :)
but I must rewrite all forms.... different for main widow and modify/insert dialogs....



another have you idea to resize all : when I resize the window ( on the left) the splitter must move to left
for the grid I found the solution

IF oApp():oGrid != NIL
oApp():oGrid:SetSize( aClient[1]-oApp():oGrid:nLeft, oApp():oDlg:nHeight - 60 )
oApp():oGrid:Refresh()
endif

I need it for the splitter and folder ...have you an idea ...? thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error on Folder class or bug

Postby Antonio Linares » Mon Nov 24, 2014 9:11 am

Silvio,

Please review FWH\samples\Layout.prg, Layout2.prg and Layout4.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41922
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error on Folder class or bug

Postby Silvio.Falconi » Mon Nov 24, 2014 9:37 am

thankssss
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error on Folder class or bug

Postby Silvio.Falconi » Tue Nov 25, 2014 7:39 am

Antonio on layout sample there are not splitters resize ....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6933
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 43 guests