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 / how do you make a text editor in dbpro?

Author
Message
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 10th Oct 2005 03:52
i have dbpro.

i was just wondering how i would make a simple program that opens .txt files and can edit and save them...

i did a search on this, but it kept coming up with stuff about c++ and stuff.

i know i can do input and stuff...but what i want is something that looks like notepad...like the whit backgroun that you can type as long as you want.

can anybody get me started?

hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 10th Oct 2005 05:35
From what I understand, DBP isn't a good choice for a text editor. The problem is that DBP likes to use all your system resources. (Remember, it IS based around game making.) If you happen to have Visual Basic, you can whip up a simple text editor in about 5 minutes or less.

I'm not saying it isn't possible with DBP, but it would be a lot of work. You'd have to create your own GUI functions and the like.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Oct 2005 14:54
If you did try, you would have to base it on arrays as there are no native windows components in DB which support strings.

Using arrays is the only way to be able to scroll the text window up and down.

As hyrichter says, you would also have to create all your buttons and user interface manually too.

Possible, but probably not worth the effort. It would probably be easier to learn Delphi...

TDK_Man

The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 10th Oct 2005 15:48 Edited at: 10th Oct 2005 15:50
You could also chose to buy BlueGui. With that dll it would be alot easyer to make a text editor. I use that dll myself, it's great!
But if you don't wanna spend moneys then you should problaly go for TDK 's advice.

PanzerGameshere
Free Particle Engine For dbpro :
here
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 10th Oct 2005 17:39
i just bought blue gui, thats actually the reason i need to make a text editor.

let me explain in more detail:

my friend is makeing a menu creator typr program. but the menu is based on scripting.

i need to make a gui that can edit that scripting with point and click buttons, but i also want a tab on there where the user can actually see the code...

another idea...can i just

"execute file notepad...bla...bla...bla"

???

if they click on the "see the code" button?? is there leagal limitations on that?

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 10th Oct 2005 19:02
It is very possible to call notepad in DarkBasic. Try this code here:



Using the "execute file" command, we can execute any exe in windows.

Immunity and Annihalation makes Immunihalation...
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 10th Oct 2005 19:17
i get that part...but am i allowed to do that if i sell the program? like...microsoft wont sue me?


let me see if i follow...you can save text to a .txt file...just not make a text editor...right?

is there a way to close the program? like close file....notepad??

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 10th Oct 2005 19:23
1) I don't really see why they should sue you...

2) You can make a text-editor. But it could be a pain in the ass. So, why not use window's editor instead...

3) Too bad, I don't think you can. But you can close notepad normally and resume your program though. (leave out the wait flag to let DB continue it's program while activating notepad)

Immunity and Annihalation makes Immunihalation...
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 10th Oct 2005 20:40
Quote: "let me see if i follow...you can save text to a .txt file...just not make a text editor...right?"


Of course you can make a text editor with blue gui Haven't you seen the examples that follows with it? One of the examples is a text editor with pretty advanced stuff(yes.. Also saving).

PanzerGameshere
Free Particle Engine For dbpro :
here
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 10th Oct 2005 22:20
ok...i didnt know that...i actually bought blue gui yesterday...about 2 or 3 hours before i posted this...so i was basically playing around with rainbow and stuff.

examples?...i am so stupid...

thanks for the help guys!

Login to post a reply

Server time is: 2024-11-27 16:37:40
Your offset time is: 2024-11-27 16:37:40