Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, June 18, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Can't set focus on invisible window
Marc Johnson
Posts: 252
 
Can't set focus on invisible windowYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jun 07 2:46 PM
I have a simple case statement that sets a few items depending on the case and then also sets the focus to specific fields. It works fine the first time but when opening the form again an error states that SalesLogix cannot set the focus on a disabled or invisible window.

Here is an example of code:
Sub pklAssetStatusChange(Sender)

Select Case pklAssetStatus.Text

case "Active"
dateStart.Focused = True
case "Inactive"
dateInactive.Focused = True
case "Terminated"
dateEnd.Focused = true
End Select

End Sub

My guess is that the form opening triggers a "Change" so the case statement goes to work but the form hasn't yet been drawn.

So how would one correct this?
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Can't set focus on invisible windowYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Jun 07 6:19 AM
If you want to do this when the form "opens".. use AXFormChange ... NOT AXFormOpen.

Open fires on form open but the bound data is NOT there yet.
Change fires AFTER ALL Bound controls have their data.


IF you need this to fire on a control change as well.. keep it and put a "call" to it in AXFormOpen.
--
rjl

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/18/2025 10:58:18 PM