Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Jul 18, 2018 8:55 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Tue Apr 03, 2012 10:11 am 
Offline

Joined: Tue Apr 17, 2007 9:19 pm
Posts: 437
I am using OpenDialog on Windows 7 and the results do not match what is shown in the documentation at http://docs.realsoftware.com/index.php/OpenDialog. Same goes for the SaveAsDialog. I would prefer the newer style dialog as shown in the docs, but instead I am getting the old style dialog, which has much more limited navigation and feels a bit dated. Is there any way to get the new style dialog? This image shows what I mean. I want the one on the left, but I am getting the one on the right:

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Tue Apr 03, 2012 9:35 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
jjfcpa wrote:
I am using OpenDialog on Windows 7 and the results do not match what is shown in the documentation at http://docs.realsoftware.com/index.php/OpenDialog. Same goes for the SaveAsDialog. I would prefer the newer style dialog as shown in the docs, but instead I am getting the old style dialog, which has much more limited navigation and feels a bit dated. Is there any way to get the new style dialog? This image shows what I mean. I want the one on the left, but I am getting the one on the right:

Image


RS uses cross-platform dialogs. If you would like the windows vista/7 "feel", you will need to invoke dialogs by using the Windows API :-) You can toss a #if targetbuild setup to ensure your application remains cross-platform compatible if not for windows only builds...API varies from OS to OS :-)

Here is the Windows API for OpenDialog
http://support.microsoft.com/kb/161286
The article is for vb.net...although declaring the API and utilizing it will be very similar in RS...

Don't forget to use a new Structure for "Private Type OPENFILENAME"

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Wed Apr 04, 2012 9:54 am 
Offline

Joined: Tue Apr 17, 2007 9:19 pm
Posts: 437
Thanks for the link. I might try that, but I disagree with your premise.

simulanics wrote:
RS uses cross-platform dialogs.


The dialog that RS displays is not a custom cross-platform dialog like you might see in Java or Qt applications. It is a native Windows dialog on Windows and a native Mac dialog on Mac. This leads me to believe that RS is using the Windows API internally, but they are using the older API instead of the new one.

I am also still wondering why the documentation shows the new dialog but that's not what I get.

Edit: I tested it on Vista, using the sample code from the documentation at http://docs.realsoftware.com/index.php/OpenDialog and the dialog that appears does not match the screenshot on that very same page.


Last edited by jjfcpa on Thu Apr 05, 2012 9:13 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Wed Apr 04, 2012 10:17 am 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
Quote:
RS is using the Windows API internally, but they are using the older API instead of the new one.

...and you are probably correct. Please file a feedback report.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Wed Apr 04, 2012 1:41 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
I agree with the older API as well. :-p definitely file a case report.. Or let one of us know you wish not to so one of us can :-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Thu Apr 05, 2012 10:27 am 
Offline

Joined: Tue Apr 17, 2007 9:19 pm
Posts: 437
I was hoping that someone would tell me I was doing something wrong or give me some magic combination of parameters. Instead I have submitted feedback with case number 20850.

<feedback://showreport?report_id=20850>


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Thu Apr 05, 2012 11:42 am 
Offline

Joined: Thu Dec 01, 2011 2:13 pm
Posts: 288
On mac, RB also uses another API. There you can use the MBS Plugin to correct that. May that works also for windows.

_________________
Mac OS X 10.3-10.8
Windows 2000 (I know it sucks)
Windows Server 2007

You want a bunch of new classes and web styles? realstudiodevspot.com (search there for Web Styles Plugin)
Folderitem is too hard? File Bin Class
I hate cows.


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Thu Apr 05, 2012 1:54 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
jjfcpa wrote:
Thanks for the link. I might try that, but I disagree with your premise.

simulanics wrote:
RS uses cross-platform dialogs.


The dialog that RS displays is not a custom cross-platform dialog like you might see in Java or Qt applications. It is a native Windows dialog on Windows and a native Mac dialog on Mac. This leads me to believe that RS is using the Windows API internally, but they are using the older API instead of the new one.

I am also still wondering why the documentation shows the new dialog but that's not what I get.

Edit: I tested it on Vista, using the sample code from the documentation at http://docs.realsoftware.com/index.php/OpenDialog and the dialog that appears does not match the screenshot on that very same page.


Just finished a googlemap class for someone else...tonight will work on a "native" system dialog class for you :-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Thu Apr 05, 2012 3:44 pm 
Offline

Joined: Tue Apr 17, 2007 9:19 pm
Posts: 437
simulanics wrote:
Just finished a googlemap class for someone else...tonight will work on a "native" system dialog class for you :-)


That would be great! By the way, the link in your earlier post is from 2004, so I think it probably refers to the old style dialogs. I think the new ones are called "Common Item Dialogs" and can be implemented by IFileDialog, IFileOpenDialog, and IFileSaveDialog. These are described in this more recent article:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb776913(v=vs.85).aspx


Top
 Profile  
Reply with quote  
 Post subject: Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
PostPosted: Sun Apr 08, 2012 8:53 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
Ok, so after extensive searching and experimenting...RS cannot implement the Modern Windows Styles (itself alone) ...although...as an alternative, I've started making a plugin (C++ can access the API's [part of .NET ewww]) which can create the modern styles you desire. Working on the code a little bit more til it satisfactorily works and will post the code as an open-source project. :-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group