Skip to main content

Autocomplete function

  • November 4, 2011
  • 5 replies
  • 0 views

[Migrated content. Thread originally posted on 26 October 2011]

Hello,

"I would like to be able to put a TextBox/Entry-Field with autocomplete on a form. I thought I would be able to do it by placing the .NET TextBox control on my form, but although I can get the TextBox to appear, and I set the properties to make it autocomplete, it doesn't seem to be working. Has anyone successfully done something like this? I created a .NET DEF file using netdefgen and System.Windows.Forms.dll".

This is a text from an old post. I am trying to get this to work aswell but I can't figure out how to fill the forms.XML file which holds the information for the autocomplete function.

Can someone help me get this to work.
Thanks,

Andre,

5 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • November 4, 2011

[Migrated content. Thread originally posted on 26 October 2011]

Hello,

"I would like to be able to put a TextBox/Entry-Field with autocomplete on a form. I thought I would be able to do it by placing the .NET TextBox control on my form, but although I can get the TextBox to appear, and I set the properties to make it autocomplete, it doesn't seem to be working. Has anyone successfully done something like this? I created a .NET DEF file using netdefgen and System.Windows.Forms.dll".

This is a text from an old post. I am trying to get this to work aswell but I can't figure out how to fill the forms.XML file which holds the information for the autocomplete function.

Can someone help me get this to work.
Thanks,

Andre,
I do not have any experience with this control or how forms.XML file works, but if you post the code you have made, others may be able to help.

  • Author
  • Rocketeer
  • 19312 replies
  • November 4, 2011

[Migrated content. Thread originally posted on 26 October 2011]

Hello,

"I would like to be able to put a TextBox/Entry-Field with autocomplete on a form. I thought I would be able to do it by placing the .NET TextBox control on my form, but although I can get the TextBox to appear, and I set the properties to make it autocomplete, it doesn't seem to be working. Has anyone successfully done something like this? I created a .NET DEF file using netdefgen and System.Windows.Forms.dll".

This is a text from an old post. I am trying to get this to work aswell but I can't figure out how to fill the forms.XML file which holds the information for the autocomplete function.

Can someone help me get this to work.
Thanks,

Andre,
Let me clarify.

I have a file which holds client names and I want a textbox using autocomplete which will show in the droplist the results after type the first charachter. (typing 'a' will show 'Andre', 'Jansen' etc.)

In my code:
MODIFY TEXTBOX-HANDLE "set_AutoCompleteMode"(
@AutoCompleteMode_SuggestAppend)
GIVING RTN-CODE.
MODIFY TEXTBOX-HANDLE "set_AutoCompleteSource"(
@AutoCompleteSource_CustomSource)
GIVING RTN-CODE.

My question is: how do I chain the CustomSource to my external file.

regards,
Andre.

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • November 7, 2011

[Migrated content. Thread originally posted on 26 October 2011]

Hello,

"I would like to be able to put a TextBox/Entry-Field with autocomplete on a form. I thought I would be able to do it by placing the .NET TextBox control on my form, but although I can get the TextBox to appear, and I set the properties to make it autocomplete, it doesn't seem to be working. Has anyone successfully done something like this? I created a .NET DEF file using netdefgen and System.Windows.Forms.dll".

This is a text from an old post. I am trying to get this to work aswell but I can't figure out how to fill the forms.XML file which holds the information for the autocomplete function.

Can someone help me get this to work.
Thanks,

Andre,
This url may be of some help:
www.c-sharpcorner.com/.../AutoCompletion.aspx

You can also set these properties at run-time using the following code:

comboBox1.AutoCompleteSource = AutoCompleteSource.AllSystemSources;
comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

The AutoCompleteSource Enumeration has following members:

AllSystemResources - Specifies the equivalent of FileSystem and AllUrl as the source. This is the default value when AutoCompleteMode has been set to a value other than the default.

•AllUrl - Specifies the equivalent of HistoryList and RecentlyUsedList as the source.
•CustomSource - Specifies strings from a built-in AutoCompleteStringCollection as the source.
•FileSystem - Specifies the file system as the source.
•FileSystemDirectories - Specifies that only directory names and not file names will be automatically completed.
•HistoryList - Includes the Uniform Resource Locators (URLs) in the history list.
•ListItems - Specifies that the items of the ComboBox represent the source.
•None - Specifies that no AutoCompleteSource is currently in use. This is the default value of AutoCompleteSource.
•RecentlyUsedList - Includes the Uniform Resource Locators (URLs) in the list of those URLs most recently used.

  • Author
  • Rocketeer
  • 19312 replies
  • November 7, 2011

[Migrated content. Thread originally posted on 26 October 2011]

Hello,

"I would like to be able to put a TextBox/Entry-Field with autocomplete on a form. I thought I would be able to do it by placing the .NET TextBox control on my form, but although I can get the TextBox to appear, and I set the properties to make it autocomplete, it doesn't seem to be working. Has anyone successfully done something like this? I created a .NET DEF file using netdefgen and System.Windows.Forms.dll".

This is a text from an old post. I am trying to get this to work aswell but I can't figure out how to fill the forms.XML file which holds the information for the autocomplete function.

Can someone help me get this to work.
Thanks,

Andre,
Thanks but I want to know how to code this in Acucobol.
I don't know how to translate C-code to cobol.

  • Author
  • Rocketeer
  • 19312 replies
  • November 8, 2011

[Migrated content. Thread originally posted on 26 October 2011]

Hello,

"I would like to be able to put a TextBox/Entry-Field with autocomplete on a form. I thought I would be able to do it by placing the .NET TextBox control on my form, but although I can get the TextBox to appear, and I set the properties to make it autocomplete, it doesn't seem to be working. Has anyone successfully done something like this? I created a .NET DEF file using netdefgen and System.Windows.Forms.dll".

This is a text from an old post. I am trying to get this to work aswell but I can't figure out how to fill the forms.XML file which holds the information for the autocomplete function.

Can someone help me get this to work.
Thanks,

Andre,
// AutoCompleteStringCollection
AutoCompleteStringCollection data = new AutoCompleteStringCollection();
data.Add("Mahesh Chand");
data.Add("Mac Jocky");
data.Add("Millan Peter");
comboBox1.AutoCompleteCustomSource = data;

This is what I am looking for, but I don't know how to translate this.

André.