MEMO : EDIT or GET with MULTILINE

MEMO : EDIT or GET with MULTILINE

Postby Jimmy » Tue Mar 28, 2023 5:56 am

i want to show LOG-File but not sure which Control to use : EDIT or GET :?:

---

Code: Select all  Expand view  RUN
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: Select all  Expand view  RUN
METHOD Find( cText )
METHOD Replace( cText )

but there is no "Dialog", or :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MEMO : EDIT or GET with MULTILINE

Postby Natter » Tue Mar 28, 2023 9:55 am

And you can't view the LOG file via Shellexecute ? :?
Natter
 
Posts: 1222
Joined: Mon May 14, 2007 9:49 am

Re: MEMO : EDIT or GET with MULTILINE

Postby Jimmy » 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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MEMO : EDIT or GET with MULTILINE

Postby TimStone » Tue Mar 28, 2023 5: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: MEMO : EDIT or GET with MULTILINE

Postby Jimmy » Tue Mar 28, 2023 8: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: Select all  Expand view  RUN
     @  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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MEMO : EDIT or GET with MULTILINE

Postby Jimmy » Thu Mar 30, 2023 6: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: Select all  Expand view  RUN

   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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 58 guests