2/21/2025 5:00:56 AM
|
|
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!
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
|
|
|
|
modify slx control from within .net
Posted: 02 Dec 08 9:20 AM
|
I have read several people refer to modifying a slx control from within .net but I cannot see how to get this to work.
I just want to change the caption of a slx label from within my .net control. I am trying to implement Ryan's suggestion for making the Save icon appear.
Could someone offer a code example showing the vbscript and C# .net code? I passed my label to my .net control but I cannot get at the .caption property. |
|
|
|
Re: modify slx control from within .net
Posted: 05 Dec 08 11:28 AM
|
Tom,
A co-worker and I have just been through this pain - specifically for the save icon. Basically (pun intended) you have to use the slxapp.basicfunctions to invoke a script in SLX.
Here's the C# code:
private void SetDirty() { m_BF.DoInvoke("ActiveScript", "System:Sales Order Dirty"); }
m_BF is a reference to the SlxApplication.BasicFunctions. I just created a shortcut in a private class variable.
Here is the SLX Script:
Set frm = Application.Forms("System:Sales Order Detail") frm.lblModifyDate.Caption = modifyDate
Where modifyDate is the current DateTime. That will change the value in the bound field, causing the save icon to light up. As long as you're going through the provider, the modify date field should get overwritten by the provider with the actual modifydate when it does it's thing.
HTH,
Jeff
|
|
|
| |
|
Re: modify slx control from within .net
Posted: 06 Dec 08 10:56 AM
|
Tom,
Maybe you can help me if you have a second. Have you run into any issues with tab order? I have about 20 text boxes, combo boxes, etc. as a main view and when I press tab, my focus goes to the "More Tabs" tab instead of the next control. I've a couple things I've yet to try:
1) The .Net contol's parent is the SLX form - not a panel or other container control. I'm wondering if that might make a difference. 2) I'm using running things through a .NET DLL instead of an .exe. I'm wondering if that works.
I'll try those - but I'm wondering if you have seen any issues.
Jeff
|
|
|
|
Re: modify slx control from within .net
Posted: 06 Dec 08 11:17 AM
|
Yes, tab order does not work. It goes directly to the slx form rather than my next control. I will try your suggestions and get back with you. Currently, my .net control's parent is the slx form and I am using a .net dll. |
|
|
|
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!
|
|
|
|
|
|
|
|