FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour class MyBrowse from Xbrowse NOT RUN
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
class MyBrowse from Xbrowse NOT RUN
Posted: Tue Feb 25, 2025 10:40 AM
I made a class from Xbrowse
CLASS MyBrowse  FROM TXBrowse
   CLASSDATA lRegistered AS LOGICAL
    DATA aBtnBrow  AS ARRAY
    METHOD New (nRow, nCol, nWidth, nHeight, oWnd)
ENDCLASS

METHOD New(nRow, nCol, nWidth, nHeight, oWnd)  CLASS MyBrowse
   ::aBtnBrow:= array(5)
   return ::Super:New()



when I insert the xbrowse on a dialog it run ok





if I insert the xbrowse on Folder not run , the xbrowse is showed on dialog and not on folder




the sample:
#include "fivewin.ch"
#include "constant.ch"

#define TXT_FOLDER1    " 1 folder "          
#define TXT_FOLDER2    " 2 folder "        
#define TXT_FOLDER3    " 3 folder "  
#define TXT_FOLDER4    " 4 folder "                  


Function test()
   local oDlg,oFld,Font,oBold
   local  nBottom   := 29
   local  nRight    := 60
   local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   local  nHeight := nBottom * DLG_CHARPIX_H
   local aArray := {}

 DEFINE DIALOG oDlg          ;
         SIZE nWidth, nHeight   PIXEL  ;
         TITLE "test con folder"

 @ 5, 3.5 FOLDER oFld ITEMS TXT_FOLDER1 , TXT_FOLDER2 ,TXT_FOLDER3 ,TXT_FOLDER4 ;
      SIZE oDlg:nWidth-242,oDlg:nbottom-240 PIXEL OF oDlg;
      OPTION 1

 @ 5, 2 XBROWSE  oLbx OF oFld:aDialogs[2] ;
         SIZE 150,105 PIXEL  CLASS MyBrowse()

       oLbx:SetArray(aArray)
       oLbx:CreateFromCode()

ACTIVATE DIALOG oDlg center
RETURN NIL



//-------------------------------------------------//
CLASS MyBrowse  FROM TXBrowse
   CLASSDATA lRegistered AS LOGICAL

    DATA aBtnBrow  AS ARRAY


    METHOD New (nRow, nCol, nWidth, nHeight, oWnd)


ENDCLASS

METHOD New(nRow, nCol, nWidth, nHeight, oWnd)  CLASS MyBrowse
   ::aBtnBrow:= array(5)
   return ::Super:New()
I tried also to insert
@ 5, 2 XBROWSE  oLbx OF oFld:aDialogs[2] ;
         SIZE 150,105 PIXEL  CLASS MyBrowse():New (, , , , oFld:aDialogs[2])
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

Continue the discussion