Problem in TFolderX ans AddItem

Post Reply
User avatar
Maurizio
Posts: 705
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Problem in TFolderX ans AddItem

Post by Maurizio »

Hello
There is a problem with Tfolderx and Additem
In folder 1 the button prompt is correctly horizontal
In folder 2 (created with additem) the button prompt is vertical

Code: Select all

#include "fivewin.ch"
Function Main()
Local oDlg  ,oFld 

  DEFINE DIALOG oDlg FROM 1,1 TO 400, 800 TITLE "Test"  PIXEL 
           
     @ 1, 1 FOLDEREX oFld PIXEL SIZE 250, 60 TAB HEIGHT 50  RIGHT  ;
         PROMPT  "Fld 1 "            
            
  ACTIVATE DIALOG oDlg CENTERED  ON init (Bottoni(oFld))

Return nil 

Function Bottoni(oFld)
Local  f := 1
Local nRow := 1 , nCol := 1 , n := 3 ,aBtn := array(15)  , y := 1


oFld:AddItem( 'Fld 2' ) 

 FOR f := 1 TO len(oFld:aPrompts)
        nCol := 5
         
         FOR n := 1 TO 3
            @ nRow, nCol  BUTTON aBtn[y] ;
               PROMPT alltrim(str(y)) ;
               SIZE 50,50 ;
               PIXEL OF oFld:aDialogs[f] UPDATE
             y++
             nCol += 60
         NEXT 
   NEXT       

Return nil
Regards MAurizio
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem in TFolderX ans AddItem

Post by Silvio.Falconi »

I do not understand, non ho capito, No entendi, Ich habe es nicht verstanden

I see it this way

Folder 1
Image

Folder 2
Image
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem in TFolderX ans AddItem

Post by Silvio.Falconi »

try this

Code: Select all

 Function Bottoni(oFld)
    Local  f := 1
    Local nRow := 1 , nCol := 1 , n := 3 ,aBtn := array(21)  , y := 1


    oFld:AddItem( 'Fld 2' )

     FOR f := 1 TO len(oFld:aPrompts)
            nCol := 5

             FOR n := 1 TO 10
                @ nRow, nCol  BUTTON aBtn[y] ;
                   PROMPT alltrim(str(y)) ;
                   SIZE 50,50 ;
                   PIXEL OF oFld:aDialogs[f] UPDATE
                 y++
                 nCol += 60
                 If ncol>400
                    nRow += 52; nCol := 5
                Endif

             NEXT
            nRow := 1;  nCol := 5
       NEXT      

    Return nil
here run perfectly
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply