forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

window maximise issue

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Murt



Joined: 26 Sep 2006
Posts: 9

PostPosted: Fri Nov 10, 2006 5:47 am    Post subject: window maximise issue Reply with quote


Hi,

I seem to have a problem with maximising a window, perhaps I haven't fully understood some of the affects of ClearWin+ format codes.

I have a main program window which has a menu at the top and a toolbar underneath the file menu, then the rest of the space of this window is a big graphics space using the %gr code. Now in this program I have an Open File Dialog(OFD) that I am currently trying to update.

The OFD has a little preview box that shows you an image of the file that you highlight/select (single click), now after highlighting a file the image gets loaded in the preview box and then if the user decides, they can click OK, to open or CANCEL to close the OFD box.

The problem happens when the user decides NOT to open the file and clicks CANCEL, the file doesn't open at that time but if you maximise the main window, it loads the file in its graphic space (where it is originally supposed to) automatically. Is there a way to control a window maximise in FTN95?

Basically, OFD -> Select file to preview -> Cancel to come out of OFD -> Maximise Main Window -> File Loads in %GR space of main window. The obvious idea here is to only the file when and only when the user clicks OK, just like any other program.

I think I, kind, of know what the problem is about but I am not sure how to tackle it. I think when I preview the selected file (this calls another function) all the variables get loaded with that file information and they dont get cleared when CANCEL is pressed.

One thing I am uncertain of is, how does %GR react to maximise does it do an equivalent of a REPAINT?

I hope this explains the problem clearly. Any suggestions regarding this issue would be greatly appreciated.

Thank you

Kind regards

Murt
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Fri Nov 10, 2006 9:54 am    Post subject: window maximise issue Reply with quote

Murt

This is an odd behaviour. If your %gr control accepts mouse clicks then a mouse click in the Open File Dialog may be getting through to the graphics region and causing some kind of problem.

Try using a PRINT instruction in your %gr callback to report when a mouse click gets through.
Back to top
View user's profile Send private message AIM Address
Murt



Joined: 26 Sep 2006
Posts: 9

PostPosted: Mon Nov 13, 2006 4:00 am    Post subject: window maximise issue Reply with quote

Hi,

I tried the PRINT statement to see if the mouse clicks get through to the main %gr region, and I found that they dont.

The open file dialog also has a %gr region in which a preview is shown of the selected file, this calls the functions involved in actaully opening the file, but instead of projecting the file onto the main %gr region is shows it in the preview %gr region of the open file dialog.

The maximise issue still remains unsolved because when I cancel out of the open file dialog and maximise the window it still shows the last previewed file in the main %gr region.

I guess I could put a PRINT statement in every single function just to see which one is called when a window is maximised, or would that be a complete waste of time?

Thanx

Murt
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Mon Nov 13, 2006 5:41 am    Post subject: window maximise issue Reply with quote

Murt

It sounds like you should be using select_graphics_object@.
See the help file under the heading "Graphics format %gr[options]".


Back to top
View user's profile Send private message AIM Address
Murt



Joined: 26 Sep 2006
Posts: 9

PostPosted: Mon Nov 13, 2006 9:00 am    Post subject: window maximise issue Reply with quote

Hey,

Thanx a lot for all the help, your PRINT command helped me in finding the cause of the problem.

Added an if statement and a flag to resolve the issue.

Thanks once again.

Murt
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group