Folder

Folder

Postby MarcoBoschi » Mon Dec 05, 2005 2:26 pm

In this little sample is impossible to navigate in all objects of dialog using keyboard. Only with mouse is possible to change folder.

#include "fivewin.ch"

function Main()

LOCAL oDlg, oFld
LOCAL aTit := {"Anagrafica" , "Laboratorio", "Fatture" }
LOCAL aDlg := { NIL , NIL , NIL }
LOCAL aEna := { .T. , .T. , .T. }
LOCAL rb := 252
LOCAL cb := 2
LOCAL lb := 60
LOCAL ib := 1
LOCAL oBut
LOCAL oGroup
LOCAL nOption


DEFINE DIALOG oDlg TITLE "Fogli di lavoro" FROM 1, 1 TO 300, 400 PIXEL

@ 120 , 0 GROUP oGroup TO 140 , 199 of Odlg PIXEL
// oFld := tFolder():New(20,1, aTit, aDlg , oDlg , 1, , , .T., .F., 199, 100, "Folder", .F.)
@ 20 , 1 FOLDER ofld OF oDlg PROMPTS aTit[1], aTit[2], aTit[3] DIALOGS aDlg[1], aDlg[2], aDlg[3] SIZE 199, 100 PIXEL MESSAGE "CIAO"
oFld:aEnable := aEna
oFld:nOption := 1

@ 1, 1 BUTTON "Anagrafica" OF oFld:aDialogs[ 1 ] ACTION MsgInfo( oFld:nOption )
@ 2, 1 BUTTON "Laboratorio" OF oFld:aDialogs[ 2 ] ACTION MsgInfo( oFld:nOption )
@ 3, 1 BUTTON "Fatturazione" OF oFld:aDialogs[ 3 ] ACTION ( MsgInfo( oFld:nOption ), aEna := { .T. , .F. , .T. }, oFld:aEnable := aEna )
ACTIVATE DIALOG oDlg CENTERED ON INIT CreaBut(rb, cb, ib, lb, obut, odlg)

return nil

FUNCTION creabut(rb, cb, ib, lb, obut, odlg)
@ rb , cb + 1*(lb+2) - lb BUTTON oBut PROMPT "Prova1" OF oDlg SIZE lb , 24 PIXEL
@ rb , cb + 2*(lb+2) - lb BUTTON oBut PROMPT "Prova2" OF oDlg SIZE lb , 24 PIXEL
@ rb , cb + 3*(lb+2) - lb BUTTON oBut PROMPT "Prova3" OF oDlg SIZE lb , 24 PIXEL
@ rb , cb + 4*(lb+2) - lb BUTTON oBut PROMPT "Prova4" OF oDlg SIZE lb , 24 PIXEL
RETURN NIL
User avatar
MarcoBoschi
 
Posts: 1027
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Postby Antonio Linares » Mon Dec 05, 2005 5:38 pm

Marco,

FWH does not gives the focus to the folder itself, thus you can not change to a next folder page using the keyboard. Is that what you mean ?
regards, saludos

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

Postby MarcoBoschi » Mon Dec 05, 2005 5:49 pm

Yes
this is my problem
Thanks
User avatar
MarcoBoschi
 
Posts: 1027
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Postby Antonio Linares » Mon Dec 05, 2005 8:45 pm

Marco,

You may modify Class TFolder, so when it gets focus, it is not given to a contained control. We have not tested it ourselves, but it may work.
regards, saludos

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

Postby MarcoBoschi » Tue Dec 06, 2005 11:18 am

Is your intention to sort out this class?
User avatar
MarcoBoschi
 
Posts: 1027
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Postby Antonio Linares » Tue Dec 06, 2005 1:01 pm

Marco,

The problem is that if we modify this class then it may affect many users applications because if we give the focus to the folder, then the VALID of a control may be executed. Thats why it seems a better way if you modify it on your local copy.

Anyhow we may do some tests and see what we get. Its source code is available at source\classes\folder.prg

We appreciate your feedback.
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

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