FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper How to ... and Where to ...
Posts: 37
Joined: Sat Oct 22, 2005 02:15 PM
How to ... and Where to ...
Posted: Tue Oct 25, 2005 09: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
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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to ... and Where to ...
Posted: Tue Oct 25, 2005 09:35 PM

1) From mget.prg:

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

2) oWnd:SetControl( oBrw )

3) Ask to Antonio

EMG

Posts: 37
Joined: Sat Oct 22, 2005 02:15 PM
How to ... and Where to ...
Posted: Wed Oct 26, 2005 08:57 AM

Thank you for your reply. As a newbee to FW I find that a forum like this is very helpfull.

Posts: 37
Joined: Sat Oct 22, 2005 02:15 PM
How to ... and Where to ...
Posted: Wed Oct 26, 2005 08: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

Posts: 108
Joined: Sun Oct 09, 2005 06:12 PM
How to ... and Where to ...
Posted: 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
Posts: 37
Joined: Sat Oct 22, 2005 02:15 PM
How to ... and Where to ...
Posted: 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.

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.
Posts: 108
Joined: Sun Oct 09, 2005 06:12 PM
How to ... and Where to ...
Posted: Fri Nov 04, 2005 03: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
Posts: 37
Joined: Sat Oct 22, 2005 02:15 PM
How to ... and Where to ...
Posted: Fri Nov 04, 2005 11:10 AM

Thanks I'll give it a try.

Continue the discussion