Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / [BLUE] Opening Files

Author
Message
Pyramid Games Ltd
17
Years of Service
User Offline
Joined: 23rd Aug 2007
Location: Line 21, DBP
Posted: 6th Oct 2007 04:24
How can I open a file and then automatically paste it into my edit box?


Cheers,

PGL

I made you a cookie, but I eated it....
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2007 12:50
All you need to do is use setGadgetText on your edit box with the text and that will fill it in.

This is a very simple example.


Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Pyramid Games Ltd
17
Years of Service
User Offline
Joined: 23rd Aug 2007
Location: Line 21, DBP
Posted: 6th Oct 2007 15:20 Edited at: 6th Oct 2007 15:20
Not if it is more than one line. How can I do this?

I made you a cookie, but I eated it....
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2007 15:51
I see I misread a little - you want to load a text file into your edit box:



Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Pyramid Games Ltd
17
Years of Service
User Offline
Joined: 23rd Aug 2007
Location: Line 21, DBP
Posted: 6th Oct 2007 16:01
Thanks IanM.

I made you a cookie, but I eated it....
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2007 19:19
You're welcome.

I may as well take this opportunity to plug my utility plug-ins as well - this is an alternate ReadFile function that uses memory banks and my string utilities to get the file in the correct format, faster:


The logic required to load the file cleanly is far simpler too.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code

Login to post a reply

Server time is: 2024-11-25 11:47:39
Your offset time is: 2024-11-25 11:47:39