FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MEMO : EDIT or GET with MULTILINE
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
MEMO : EDIT or GET with MULTILINE
Posted: Tue Mar 28, 2023 05:56 AM
i want to show LOG-File but not sure which Control to use : EDIT or GET :?:

---
Code (fw): Select all Collapse
PROCEDURE TXT_Edit( cFile, lEdit )
some Question :
how to "save" File when something have "change" ( VAILD TXTRelease( lEdit, cFile, cMemo, cSave) )
how to use READONLY when lEdit = .T. (Syntax)
how to show ROW / COL of Cursor Position
how to call Find / Replace Dialog under Fivewin

CLASS TMultiGet have
Code (fw): Select all Collapse
METHOD Find( cText )
METHOD Replace( cText )
but there is no "Dialog", or :?:
greeting,

Jimmy
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: MEMO : EDIT or GET with MULTILINE
Posted: Tue Mar 28, 2023 09:55 AM
And you can't view the LOG file via Shellexecute ? :?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: MEMO : EDIT or GET with MULTILINE
Posted: Tue Mar 28, 2023 10:18 AM
hi,

you are right that i can use Shellexecute() and use Notepad.EXE

i´m still learning Fivewin to i got to that Point where i want to "edit" TEXT File
1st Question is which Control to use under Fivewin , EDIT or GET with MULTILINE :?:

other Question belong to "working" with Control and "how to"

for "find/replace" Dialog i have open separate Thread
greeting,

Jimmy
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: MEMO : EDIT or GET with MULTILINE
Posted: Tue Mar 28, 2023 05:48 PM

How are you creating your log file ? I actually have log databases and each entry is a record. Then I simply use the BROWSE( ) function to view it. That gives me the ability to edit, delete, print, etc.

Use a multiline GET with READONLY to view a plain text. It is a MEMO configuration.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: MEMO : EDIT or GET with MULTILINE
Posted: Tue Mar 28, 2023 08:04 PM
hi Tim,

it is not "special" for Logfile

general i want to "look" into "Text" File like a Memo of *.FPT

i also want to use a "Find" and/or "Replace" Dialog for Memo
https://forums.fivetechsupport.com/viewtopic.php?t=42959

btw. Memo can also be *.RTF

---
Use a multiline GET with READONLY to view a plain text. It is a MEMO configuration.
i do not know how to use #command Syntax and have try
Code (fw): Select all Collapse
      @  3,  3 GET oMGet VAR cMemo ;
              MULTILINE ;
          /* IF(lEdit,NIL,READONLY) */  ;        // this line is wrong
              FONT oFontDefault ;
              COLOR BFcolor, BGcolor ;
              ON CHANGE OnChanged( oMGet, oStatusBar ) ;
              SIZE nHeight - 70, nWidth - 20 OF oWnd PIXEL
how is the right #command Syntax :?:

---

my Question about EDIT or GET was as i see no big Difference so i´m not sure about it
now i use GET MULTILINE and it seems to work so far ...
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: MEMO : EDIT or GET with MULTILINE
Posted: Thu Mar 30, 2023 06:16 AM
hi,

i have to ask again if GET / EDIT MULTILINE under GUI are from "WC_EDIT" :?:

i want to know if EM_* Constant can be used to "change" Position of Cursor in String

i try this
Code (fw): Select all Collapse
   nPosi := hb_at( UPPER( cFind ), UPPER( cMemo ), nStart )
fwlog "suche ... " , cFind,nStart, nPosi
   IF nPosi > 0
      oMGet:nPos := nPosi
      hMemo := oMGet:hWnd
      SendMessage( hMemo, EM_SETSEL, nPosi - 1, nPosi + LEN( cFind ) )
      nStart := nPosi + 1
but it seems not to work and "mark" found Position ...

what i´m doing wrong :?:
greeting,

Jimmy

Continue the discussion