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.

Code Snippets / [DBP] Text Boxes

Author
Message
bob_marley
17
Years of Service
User Offline
Joined: 19th Sep 2007
Location:
Posted: 2nd Jan 2008 22:55 Edited at: 3rd Jan 2008 02:41
I needed some editable text boxes for a project (cant use input forever)

This is what i came up with...


Works:
multiple text boxs
click and drag selection
arrowkeys move cursor
shift and arrowkeys change selection
ctrl+a/x/c/v do stuff
text boxes easily editable (just change array data)
ctrl tab between them (pressing tab makes invisible character when ctrl not pressed down)-if anyone can fix this be my guest..

Its rather...massive for a simple function so any reductions appreiciated.

Also apologies not very well rem'ed,any Q's just ask...

P.s if this has been done before forgive my nooblyness

edit: added 2 lines so text boxs dont "overflow"


hi
bob_marley
17
Years of Service
User Offline
Joined: 19th Sep 2007
Location:
Posted: 5th Jan 2008 21:51
still no repies?

come on people give me something to work with ?

oh btw i have updated it so box's can be set too read only
(can still select and copy)
or set to password word mode
(replace with *******)
and changed repeat timers to timer() based instead of fps

codes on other comp tho

working on multiple line

i think i have also figured out how to fix invisible characters problem.

hi
Eevil Weevil
17
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 12th Jan 2008 18:45
Quote: "arrowkeys move cursor"
Erm... No.

Impossible? Anything is impossible. 48'6F'77'20'64'61'72'65'20'79'6F'75'20'77'6F'72'6B'20'6F'75'74'20'6D'79'20'73'69'67'21

Mr Kohlenstoff
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 12th Jan 2008 22:11
Good work, but usually the delete-key should remove the following char and not the previous one. Further you should make the cursor be always visible when a key is pressed, that makes arrowkey-navigation (which works for me, btw) much easier.

bob_marley
17
Years of Service
User Offline
Joined: 19th Sep 2007
Location:
Posted: 14th Jan 2008 11:46
i thought no one would reply...

i've made a few changes..

but it'll need tidied

and arrow keys have allways worked for me, timer thing good point should be easy enough

http://forum.thegamecreators.com/?m=forum_view&t=121141&b=6

simple editable text boxes..
bob_marley
17
Years of Service
User Offline
Joined: 19th Sep 2007
Location:
Posted: 15th Jan 2008 11:12
heres update not much done but i been busy was quite an effort to dis entangle from my other project- bad organization on my part

fixed arrow key thing
added a few tings -
can have read only and password style boxes(special flag)

switched global values to array's

switched timer's to actual timer based not fps
(cursor was blinking to fast and was hard just delete one char or took too long if fps droped low)

still working on multi-line and asc filter (too stop writing invisible characters.
2nd shouldn't be hard, 1st might take a while
still terribly remed and badly organized

what should i add/want doesn't work? i'll get round to it eventially.

Also if anyone else wants to improve it feel free

http://forum.thegamecreators.com/?m=forum_view&t=121141&b=6

simple editable text boxes..
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Jan 2008 21:06
DBC does not have Types or Globals so I've amended the topic line.

There's an equivalent for DBC in the 'Media-Less GUI Function Collection' thread if anyone is looking for one.

TDK_Man

Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 25th Jan 2008 18:13
Hey, good work!

That's really neat.


You are not alone.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 26th Jan 2008 00:48
Wow nice job on this.

FuSSeL
16
Years of Service
User Offline
Joined: 13th Mar 2008
Location:
Posted: 13th Mar 2008 16:26
hy there

the code prints an error in my db

error
parameter mismatch expression entry$ at line 162

can you tell me whats the problem

greetz

basti

Login to post a reply

Server time is: 2024-11-22 12:50:29
Your offset time is: 2024-11-22 12:50:29