Open a specific folder ON INIT

Post Reply
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Open a specific folder ON INIT

Post by Rick Lipkin »

To All

I would like to open a specific folder ON INIT .. in this example I have 3 folders and I want to have the second folder open and be in focus ON INIT. This code does not seem to work.

Rick Lipkin

Code: Select all

ACTIVATE DIALOG oSchA NOWAIT    ;
     ON INIT ( _XbrGoToCol( oLbxA, 2),_XbrGoToCol( oLbxB, 2),_XbrGoToCol( oLbxC, 2),;
              IF( (xSUPER = 'Y'.or. xMGR = 'Y' .or. xADMIN = 'Y' .or. xDispatch = "Y"), ,oBTN7:HIDE() )) ;  // change motorpool hide
                VALID(!GETKEYSTATE( 27 ))


ACTIVATE WINDOW oWNDCHILD ;
         ON INIT ( oSchA:Move( 0,0, oWndChildA:nWidth, oWndChildA:nHeight, .T. ), ;
           oWndChildA:bResized := {|| _ReSizeUm( oSchA,oWndChildA,oLbxA,oFld ) }, ;
           oFld:aDialogs[2]:SetFocus());  //  <----  HERE
         VALID ( IIF( !lOK, _CloseRes(.T.,oFontB, oFontB1, oRsPdisp, oLbxA, @lOk ),.F. ))
 
Image
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Open a specific folder ON INIT

Post by cnavarro »

Try oFolder:SetOption( 2 )
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Open a specific folder ON INIT

Post by Rick Lipkin »

Thanks Cristobal .. that worked !

Rick Lipkin
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Re: Open a specific folder ON INIT

Post by Armando »

Rick:

I have this code

Code: Select all

        oFld:SetOption(2)
        oFld:nOption := 2
        oFld:Refresh()
 
Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Open a specific folder ON INIT

Post by nageswaragunupudi »

We use ON INIT when that is the only way to get what we need.

In case of folders we can specify an initial folder even during definition.

Code: Select all

@ r, c  (OR REDEFINE) FOLDER ....... <clauses> ;
    OPTION nInitialFolderNo ;
    <moreClauses,...>
 
Regards

G. N. Rao.
Hyderabad, India
pacotre
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am

Re: Open a specific folder ON INIT

Post by pacotre »

Buenos dias:
Como puedo bloquear el acceso a una pestaña de un folder si no está autorizado?

Gracias.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Open a specific folder ON INIT

Post by nageswaragunupudi »

Code: Select all

oFolder:aEnable[ nDlg ] := .f.
Regards

G. N. Rao.
Hyderabad, India
pacotre
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am

Re: Open a specific folder ON INIT

Post by pacotre »

Pero lo que yo necesito no es deshabilitar una pestaña. Lo que quiero es que una vez que se entra (se pincha), si la evaluación no es correcta, salir de esa pestaña nº 7 y volver a la 1 ó a la que sea, sin mostrar el dialogo de la 7.
No sé si me explico bien.
Pulso pestaña 7, compruebo si existe algo y si no existe rechazo la entrada a esa pestaña, simular esa deshabilitación comentada. No se trata de ON INIT, que eso sí lo tengo controlado.
Gracias
Post Reply