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.

The 20 Line Challenge / File Selector In 15 Lines

Author
Message
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Oct 2005 02:57 Edited at: 6th Nov 2005 16:06
Here's a basic file selector program in 15 lines.

Written in DBC, it also runs in DBPro, but for some reason the text seems to be wider than when it runs in DBC, so some files overspill the box. This doesn't happen in DBC.

As I was aiming to get the job done in the fewest number of lines possible, I didn't include a panel title or file filter. But, as there are 5 lines spare, it should be possible to add those and still stay within 20 lines as well as make it a function if required.



[Edit] Use the mouse wheel to scroll the filenames in the box when they don't all fit in.

TDK_Man

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 13th Oct 2005 00:23
I like!


UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 15th Oct 2005 23:07
Cool. The only problem is that it only lists the first 12 files.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th Oct 2005 07:53
No it doesn't!

Use the wheel on your mouse!

TDK_Man

UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 30th Oct 2005 17:08 Edited at: 30th Oct 2005 17:08
oh...Why does the OK and the CANCEL button flash really fast? It looks kind of strange...

Once this is fixed, I will use it in my Map - Editor program, if you let me...

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Nov 2005 16:05
Quote: "Once this is fixed, I will use it in my Map - Editor program, if you let me..."


Sure - no problem.

As for the flashing, it might be a side effect of using DBP (it was written in DBC).

TDK_Man

Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 20th Nov 2005 01:08
maybe sync problems?

ok, I just hit him with a shovel. Is he still conscious? Yea, I think so. Then hit him again!
If at first your dont succeed, then skydiving is not for you
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 20th Nov 2005 23:28
I used DBC...oh well...Cool File selector anyway! I liked the one on your website better though

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Nov 2005 01:26
Quote: "I liked the one on your website better though"


Yes, that one was better, but the idea of this board is to attempt to get as good a program as you can in 20 lines - and that one wouldn't fit into 20 lines.

TDK_Man

Darkbasic MADPSP
18
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 16th Dec 2005 23:13
Tdk that won't run for me

Experienced DB http://www.greatgames3d.com (work in progress site)
Drew the G
User Banned
Posted: 17th Jan 2006 04:29
It rocks. I like I like I am so totally using this...

Chily Dog
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location: U.S.A.
Posted: 17th Jan 2006 07:07
Pretty cool. It's nice to see something in DB classic (I'm still in the process of upgrading to Pro.)
Diablos
18
Years of Service
User Offline
Joined: 15th Oct 2005
Location: meh?
Posted: 17th Jan 2006 13:27
i may be an idiot but i dont get what its supposed to do.

anyone tell me what it does?
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 18th Jan 2006 05:55
Sweet god! this rocks TDK!

[href]http://snowfall.homestead.com [/href]
Drew the G
User Banned
Posted: 19th Jan 2006 05:33
@diablos

You can select files from wherever you want. Like, when using Notepad, and looking for a document to open, 'cept this is for DB.

Charlie
18
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 25th Jan 2006 22:10
Cool file selector!

Have a nice day
tiffer
17
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 8th Apr 2006 20:48
Diablos, it's a file selector, it's purpose is to select files.

C.Watson

Login to post a reply

Server time is: 2024-03-29 14:45:47
Your offset time is: 2024-03-29 14:45:47