How to read / modify / save the text of notepad in the .pnl

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
gyu
Posts:11
Joined: Wed Mar 19, 2014 2:08 am

How to read / modify / save the text of notepad in the .pnl

Post by gyu »

Hi,

Using a WinccOA 3.12 on the project.

customer request functioality like notepad .

if click the button on the screen, popup.pnl will be opened with notepad text .

and

when click the save button on the popup.pnl, overwrite it into notepad text.

plz tell me the solution with reference to attached file.

thanks. Image
Attachments
notepad_pnl.png

m.sabitov
Posts:23
Joined: Fri Feb 21, 2014 7:20 am

Re: How to read / modify / save the text of notepad in the .pnl

Post by m.sabitov »

Hi!
it's very easy, looking attach panel, but this simple example work only with one line text. https://www.winccoa.com/fileadmin/image ... tepad3.zip
Attachments
notepad3.zip
(1.06 KiB) Downloaded 249 times

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: How to read / modify / save the text of notepad in the .pnl

Post by mkoller »

You can have a look at the CTRL function textEditor(), which opens a text editor which also allows to save the file again
(this solution does not use an extra panel).

You can also check the std panel: STD_PANELS/note_info (from the catalog). Either you can use it directly or just see how it's done there.

If you want your own panel, which contains a TEXT_EDIT widget, you can simply use
fopen(), fputs(), fclose() functions.

3 posts • Page 1 of 1