The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Two questions...
Posted: 23 Oct 06 3:44 AM
|
fiogf49gjkf0d Hello, right I basically am unsure of the following two things, first one related to a form, second to a datagrid.
1. When running on the onformopen event, if an "if-statement" is not met within the code I want to prevent the form from displaying, how do I close it? 2. I recently posted about removing hints but I've actually mixed up my terms there, it's basically the preview display that pops up when the column is not big enough to view all the text, it pops up when you hover over the text and I need to get rid of that if possibly.
All help appreciated. |
|
|
|
Re: Two questions...
Posted: 23 Oct 06 12:10 PM
|
fiogf49gjkf0d Kevin,
1 -- I would create a vbscript that checked the If statement and if it was met then launch the form.. so you'd be calling the script from where ever your launching the form from now.
2 -- did you try two things for the grid.. disable Preview and disable tooltips
Hope that helps |
|
|
|
Re: Two questions...
Posted: 23 Oct 06 3:42 PM
|
fiogf49gjkf0d 1. Application.BasicFunctions.CloseCurrentView(false) would probably be the better alternative. The if statement may not be able to be checked outside of the form easily and this will allow you to keep everything together. |
|
|
|
Re: Two questions...
Posted: 23 Oct 06 4:47 PM
|
fiogf49gjkf0d Jeremy,
He wants to stop the view from ever opening if the condition isn't met.. that won't work for him will it..? |
|
|
|
Re: Two questions...
Posted: 23 Oct 06 5:04 PM
|
fiogf49gjkf0d it really depends on how the form is being launched in the first place, but it might work for you to use Application.BasicFunctions.CurrentViewCancelShow.
However, I would tend to instead modify the code that invokes the form in the first place and add the condition there, so it is never invoked if the condition is not met. |
|
|
|
Re: Two questions...
Posted: 23 Oct 06 5:07 PM
|
fiogf49gjkf0d Form.ModalResult is the better choice, but you are both correct. If you want to stop a form, it's best to stop it before it opens. Using OnOpen would mean that the form would open then close immediately. If you don't have a good error message stating why, users are likely to complain. |
|
|
|
Re: Two questions...
Posted: 24 Oct 06 3:42 AM
|
fiogf49gjkf0d Thanks for your replies, I did anticipate your responses with the form closing question so I wrote a VB Script that set up a global variable etc etc even though I don't think the form displays until the onopen event is completely run I will keep the script in place as it's tidier |
|
|
|
Re: Two questions...
Posted: 24 Oct 06 3:53 AM
|
fiogf49gjkf0d No joy on the second question... any ideas? |
|
|
|
Re: Two questions...
Posted: 25 Oct 06 4:47 PM
|
fiogf49gjkf0d I'd do what RJ suggested and try disabling things. It might take a special combination of something on/something off to get the desired result or you just may be out of luck. |
|
|
| |
|
Re: Two questions...
Posted: 27 Oct 06 3:38 AM
|
fiogf49gjkf0d I've managed to change the funtionality so that when the columns are moused over the results returned aren't nonsense (as I was storing colour information originally within the hour of the time which was being returned on mouseover). Thanks all for your responses! |
|
|
|