Page 1 of 1

Problem in TFolderX ans AddItem

Posted: Thu Oct 03, 2019 8:00 am
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

Re: Problem in TFolderX ans AddItem

Posted: Fri Oct 04, 2019 8:40 am
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

Re: Problem in TFolderX ans AddItem

Posted: Fri Oct 04, 2019 8:53 am
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