How to ... and Where to ...

How to ... and Where to ...

Postby kronos911 » Tue Oct 25, 2005 9:23 pm

1) How can I track the length of a multi line get. I understand that the UDF of the ON CHANGE clause is the trick. What parameters are passed to it (the NG file is missing that kind of info). Will something like this work for the UDF
Code: Select all  Expand view  RUN
PROCEDURE MemoLenChk(nLen)
  IF LEN(oGetMemo:cText()) <= nLen
    oGetMemo:KeyChar()
  ENDIF
RETURN


2) How can I make the size of a listbox "lock" to the size of the window it's drawn in? When a user zooms a window the listbox should "follow" the window's size and redraw itself to that size.

3) Where can I find a detaled hlp or ng file for fivewin 2,3. A fellow coleague has lost the original one and cant find the setup files

Thanks
------
Using 1.92 demo version of FW for Clipper
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Re: How to ... and Where to ...

Postby Enrico Maria Giordano » Tue Oct 25, 2005 9:35 pm

1) From mget.prg:

Eval( ::bChange, nKey, nFlags, Self )

2) oWnd:SetControl( oBrw )

3) Ask to Antonio

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby kronos911 » Wed Oct 26, 2005 8:57 am

Thank you for your reply. As a newbee to FW I find that a forum like this is very helpfull.
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby kronos911 » Wed Oct 26, 2005 8:17 pm

Ok next question. How to make a GET object that is editing a Date field popup an datepicker when there is a bad date.
I know recompile and relink the TGET.PRG with a moded lValid METHOD. (The datepicker is the msgdate source code I got from a colleges 2.3 installation and will mod it to support Greek language).
I want to know if there is an easy way to do it.
Thanks
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby DanielPuente » Thu Oct 27, 2005 12:35 am

Kronos:

Use the valid clause of the get (redefine get .... VALID Valfecha(cFecha), and in valfecha() you evaluate the date.)

Regards,
Daniel Puente
Mar del Plata, Argentina
danielpuente@speedy.com.ar
puenteda@hotmail.com
DanielPuente
 
Posts: 108
Joined: Sun Oct 09, 2005 6:12 pm
Location: Mar del Plata - Argentina

Postby kronos911 » Fri Nov 04, 2005 12:59 am

I want to display a login dialog box after the MDI framework loads and before the main app starts. What I have gotten so far is to display that dialog before everything.

Code: Select all  Expand view  RUN
PROCEDURE MAIN()


  DEFINE WINDOW oMainWin MDI TITLE OemToAnsi(“IFT - …”)
    IF LogInUser()
      IF OpenDbfs()
         // display the main MDI child browser window and set up the menu system
      ENDIF
    ELSE
       oMainWin:End()
    ENDIF
  ACTIVATE WINDOW oMainWin
RETURN

STATIC FUNCTION LogInUser()
  LOCAL oLogIn, lGo := .F., oGet1, oGet2, oOKBtn, oCancelBtn

  DEFINE DIALOG oLogIn of oMainWin
  ….
  …
  ACTIVATE DIALOG oLogIn CENTER
RETURN lGo


If I have to use MDI child windows instead of dialogs how can I make the app stop at them until the user passes or fails the authorization prossess.
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby DanielPuente » Fri Nov 04, 2005 3:35 am

Kronos:

IF you call loginuser() BEFORE the activate window, obviously the windows does not appears until you close that dialog. You have to use the ON INIT clause of the ACTIVATE WINDOW, so the windows is activated and the login dialog appears over it, and if the user don't pass the login dialog you close the window. Something like this:

ACTIVATE WINDOW oWnd maximized ON INIT (oSpl:AdjRight(),IF(Login(),(cLogin:=.T.,Start(),MuestraUsuario()), oWnd:End()));
valid IF(cLogin.and.vPrevia(cLogin),MsgYesNo( "Abandona el Sistema ?"," Confirme: "),IF(cLogin,.F.,.T.))


In your case:

ACTIVATE WINDOW oWnd maximized ON INIT IF(LogInUser(),,oWnd:End())

Regards,
Daniel Puente
Mar del Plata, Argentina
danielpuente@speedy.com.ar
puenteda@hotmail.com
DanielPuente
 
Posts: 108
Joined: Sun Oct 09, 2005 6:12 pm
Location: Mar del Plata - Argentina

Postby kronos911 » Fri Nov 04, 2005 11:10 am

Thanks I'll give it a try.
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 2 guests