Open a specific folder ON INIT

Open a specific folder ON INIT

Postby Rick Lipkin » Thu Jan 26, 2017 5:47 pm

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  Expand view  RUN

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
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Open a specific folder ON INIT

Postby cnavarro » Thu Jan 26, 2017 6:01 pm

Try oFolder:SetOption( 2 )
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Open a specific folder ON INIT

Postby Rick Lipkin » Thu Jan 26, 2017 6:21 pm

Thanks Cristobal .. that worked !

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

Re: Open a specific folder ON INIT

Postby Armando » Fri Jan 27, 2017 3:30 am

Rick:

I have this code

Code: Select all  Expand view  RUN

        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
Armando
 
Posts: 3229
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Open a specific folder ON INIT

Postby nageswaragunupudi » Sun Jan 29, 2017 6:28 am

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  Expand view  RUN

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Open a specific folder ON INIT

Postby pacotre » Fri Apr 03, 2020 7:30 am

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

Gracias.
pacotre
 
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am

Re: Open a specific folder ON INIT

Postby nageswaragunupudi » Fri Apr 03, 2020 8:47 am

Code: Select all  Expand view  RUN
oFolder:aEnable[ nDlg ] := .f.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Open a specific folder ON INIT

Postby pacotre » Sun Apr 12, 2020 3:42 pm

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
pacotre
 
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 73 guests