Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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: Disabled panels still allow edit
Marc Johnson
Posts: 252
 
Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Oct 07 3:54 PM
I have a simple little script:

if txtOppStatus.Text = "Closed - Won" or txtOppStatus.Text = "Closed - Lost" then
pnlDetail.Enabled = False
pnlContract.Enabled = False
pnlContract2.Enabled = False
pnlReferral.Enabled = False
else
pnlDetail.Enabled = True
pnlContract.Enabled = True
pnlContract2.Enabled = True
pnlReferral.Enabled = True
End If

The problem is that if a user is on an opportunity that IS enabled and leaves the cursor in one of these panels and uses the 'VCR' buttons to move to a closed deal, while the panels are disabled the cursor is live and active in the field and the user can enter data.

I'd like to avoid having to set all those fields to read-only. Any thoughts? This seems like a bug to me.
(oh v6.2.6 ... for now)
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 07 1:51 PM
So they can only edit a field in a disabled panel if they were in that field prior to moving between records. If they weren't in that particular field, they wouldn't be able to select it on a disabled panel, right? If that's the case, you could just set the focus to a different field in the WhenChange event of the form. Every time they would move between records, they would be forced out of the currently selected field and into another one that you would define.

[Reply][Quote]
Jason Buss
Posts: 382
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 07 1:51 PM
**double post**

[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Oct 07 2:08 PM
Well I changed the focus but I had to create a field that was partially obscured and lead no where. The problem is that the form will have NO active fields when disabled, so there was nothing I could shift my focus to.

Is there an easy way to shift focus off the form all together, say to the Opportunity Description on the main detail view?
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Oct 07 2:47 PM
If I'm understanding correctly, shifting focus to Opportunity Description would just allow them to edit the value in Opportunity Description on a read-only record. I suppose you could set focus to a control which is not typed into, a command button for example, if present.
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Oct 07 3:14 PM
I just created a text field, removed the 3D, the border lines and made it the same color as the background and then folded it up on itself so you cant see the cursor blinking. It's a hack but it works.
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Oct 07 3:39 PM
I'm glad that worked for you. I wonder though, what if you just set the visible property of the txt field you are using to False? I would imagine that would have the same result with less steps.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 07 6:54 AM
Seems like alot of work. Does the user not need to see this value? If so then yes set the visible property to false. If they do need to see the value then put a lable under it and toggle visibility between them.

Mark
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 07 8:18 AM
Problem is that you cannot set focus to an invisible item. It throws up an error.

I'd still like to change focus to the main opportunity detail form, if possible, but I have no clue how I'd do that.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 07 8:23 AM
Question, I may be missing the point but why would you want to set focus to either the detail panel or the invisible item. Focus is to be given to controls that are editable IMHO. Focus is provided to the next control in the tab order as defined. If you order the controls correctly then focus would go to the next editable control. If you are physically setting focus then I assume a condition around is visible will determine if you can give focus to the control or not. you might even give focus to the label instead. Give focus to the first control in the tab order and not the detail panel makes more sense I believe.

Mark
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 07 8:29 AM
The problem is that focus remains on a field (any field on this form) after I've disabled the panel that those fields are sitting on. When the focus remains, it allows the user to edit the field, even though the panel is disabled. I want to move the focus off the form entirely so this situation does not occur.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Disabled panels still allow editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Oct 07 7:54 AM
Maybe put a label control behind the panel and when you disable the panel, focus the label.

Mark
[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/20/2025 2:48:06 PM