We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SettingFile doesn't work with User Control

Thread ID:

Created:

Updated:

Platform:

Replies:

8533 Nov 10,2003 07:01 PM Nov 14,2003 09:43 AM Windows Forms 7
loading
Tags: EditControl
Administrator [Syncfusion]
Asked On November 10, 2003 07:01 PM

Hi, I crreated a simple WinForm app. If I add edit control to a form, it would understand the SettingFile property. However, if I add the control to an user control, then add the user control the a Form, it always prompt "The specified setting file is not found". Does anyone have any idea how to walk around this problem? Thank you very much. Regards, Linh Vu

Administrator [Syncfusion]
Replied On November 10, 2003 07:34 PM

Hi, I actually found out a simple way to walk around by setting the SettingFile of the Edit Control in your Form. However, you would have to set the modifer of the edit control within the User Control to be accessible from outside. This doesn't help my case as I designed a few user controls inside user controls. I wonder what could be in the source code of the SettingFile for an edit control? Regards, Linh Vu

Administrator [Syncfusion]
Replied On November 11, 2003 04:33 PM

Hi Linh Vu, Please refer to the sample application attached. Here I have created a user control - Form2 which contains the EditControl and then placed an instance of Form2, i.e., f2 in the host form Form1. I have used the CPP.ini configuration file as the setting file value for the EditControl. The setting file is correctly detected and the EditControl works fine even when it is placed with a user control (Form2). Please let me know if this helps. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On November 12, 2003 05:56 PM

Hi Guru Patwal Thanks for your reply, but it doesn't address the problem. Your Form2 is a WinDown Form, not an UserControl. If you create an UserControl, add EditControl, set the setting file. Then, build your project and add the UserControl to a form in the same project. It will then prompt "setting file not found". I'm looking forward to your response. Regards, Linh Vu > Hi Linh Vu, > > Please refer to the sample application attached. Here I have created a user control - Form2 which contains the EditControl and then placed an instance of Form2, i.e., f2 in the host form Form1. I have used the CPP.ini configuration file as the setting file value for the EditControl. The setting file is correctly detected and the EditControl works fine even when it is placed with a user control (Form2). Please let me know if this helps. > > Regards, > Guru Patwal > Syncfusion, Inc.

Administrator [Syncfusion]
Replied On November 13, 2003 09:47 AM

Hi Linh Vu, Apologies for having not understood your requirements correctly earlier. Please refer to the new sample attached. In this sample, I have a UserControl which has an EditControl in it, and then I add this UserControl to the main form. The SettingFile property of the EditControl seems to work fine here. I have used CPP.ini as the configuration file in this example. It works fine in both of the following cases : 1. Setting the value using Syncfusion.Windows.Forms.Edit.EditControl.CPPIni enumeration value 2. By directly specifying the configuration file. In this case please make sure that the enumeration fils is present in the ..\bin\debug\ folder of your project. Please try this sample and let me know how it goes. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On November 13, 2003 06:14 PM

Hi Guru Patwal Thanks for your reponse. Your example works. However, there is still a problem with User Control, that if you create an user control, then Drag the user control from the Toolbox to your form, it will then prompt the message "The specified setting file was not found". Is there anyway Syncfusion can fix this, as we would prefer to be able to drag our user control to the form rather than declare and setup position manually with code. Thank you. Regards, Linh Vu

Administrator [Syncfusion]
Replied On November 13, 2003 06:31 PM

Hi Guru Patwal The following are exceptions occur with Edit Control: - Drag user control that contains Edit control to a Form from Toolbox: "The specified setting file was not found" - Ignore that warning. Run the application, exception is thrown from the line editControl.SettingFile = "fileName" or Syncfusion.Windows.Forms.Edit.EditControl.VBScriptIni Exception message: "Input string was not in correct format". - Catch the exception, Edit Control works well with proper coloring. The question here is: why does it prompt not finding the file and throw exception of incorrect format string? And it doesn't make sense that the control works well after throwing such exception about its setting file. Please follow the steps exactly to re-produce the defects. I'm looking forward to your reponse. Regards, Linh Vu

Administrator [Syncfusion]
Replied On November 14, 2003 09:43 AM

Hi Linh Vu, Thanks for the update. I have modified my earlier sample as per your specifications above, and re-attached it here. The SettingFile property of EditControl seemed to work fine (without any exceptions) when the UserControl is dragged and dropped from the VS.NET ToolBox. Make sure that the ToolBox icon links to the exe file in the ..\bin\Debug\ sub-folder of the project folder. Please try this and let me know how it goes. Also, let me know the version of Essential Edit that you are using. Sorry for the inconveniences caused, and thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;