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.

DLL Talk / BlueGUI - Open File - multiple file extensions

Author
Message
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Jun 2005 00:16
I want to list all image files in an OpenDialog(). I don't think it's working like it should...

file$=openDialog("Select Image","(All Image Files)|*.bmp;*.jpg;*.png;*.tga|(*.bmp)|*.bmp|(*.jpg)|*.jpg|(*.png)|*.png|(*.tga)|*.tga")

The "All Image Files" option doesn't display any files at all. Any ideas?

BatVink
Tartopom
19
Years of Service
User Offline
Joined: 27th Jun 2004
Location:
Posted: 2nd Jun 2005 06:05
file$ = openDialog("Select Image", "All Image Files (*.bmp;*.jpg)|*.bmp;*.jpg")

should work.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Jun 2005 07:35
Doesn't work unfortunately. I removed all individual file extensions, and had just one entry with all extensions. You end up with nothing displayed.

BatVink
pizzaman
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 3rd Jun 2005 01:22 Edited at: 3rd Jun 2005 01:24
This works for me



Its probably a little OTT though, so you may need to edit it.

BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jun 2005 01:56
It seems to be the same format as mine, but mine fails

Mine works for single extensions per entry. So, I can select just BMPs, or just JPGs, but I couldn't have both in the same selection.

I'm on a new laptop with no DBP at the mo, I'll copy and paste yours tonight, see if it runs as shown.

BatVink
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 18th Jul 2005 05:59 Edited at: 19th Jul 2005 06:57
I just got BlueGUI a few weeks ago so I'm not sure whether openDialog works properly for me, but I know that this code (to call the API manually) does work for me:

If this doesn't work, might something be different about your windows API calls?

I hope this helps.

-Xol

XolTech, Ltd: IonRay IDE for DBPro in progress
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 19th Jul 2005 06:58
By the way, the above code is completely free/open source. I don't need any credit - use it for whatever you want.

-Xol

XolTech, Ltd: IonRay IDE for DBPro in progress
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Jul 2005 17:12
Cheers! I never did get this one fixed.

BatVink
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 20th Jul 2005 00:27
Batvink, did my code work?

-Xol

XolTech, Ltd: IonRay IDE for DBPro in progress
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Jul 2005 01:42 Edited at: 20th Jul 2005 01:43
Quote: "It seems to be the same format as mine, but mine fails"


BatVink, your format string is very different from pizzaman's. I have no idea what your one is supposed to be doing!

The correct syntax for multiple extensions:

file$=openDialog(title$,"group name|*.ext1;*.ext2;*.ext3|second group name|*.ext4;*.ext5;*.ext6")


BlueGUI Windows Plugin
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 20th Jul 2005 03:42 Edited at: 20th Jul 2005 03:47
Rob K,
BatVink's code gives five groups to choose from:

Each one has its corrosponding system extensions.

BatVink's code works for me.

Batvink's code should work on his computer, but if not, there is either a differnece in his Windows API, or a bug in BlueGUI.

[EDIT]BatVink's code is the same as pizzaman's, except different text for the user to see, no support for .jpeg, and no support for 'All Files'. [/EDIT]

Good luck, BatVink

-Xol

XolTech, Ltd: IonRay IDE for DBPro in progress
Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 22nd Jul 2005 02:46
BatVink, it must be in the API. Your command works correctly on my system and it follows the syntax correctly.

I'm using WinXP Home SP2

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!

Login to post a reply

Server time is: 2024-03-29 08:14:41
Your offset time is: 2024-03-29 08:14:41