Keyoti RapidSpell Desktop .NET API Docs
GetSuggestions Method
APIKeyoti.RapidSpellRapidSpellAsYouTypeGetSuggestions()()()()
Keyoti RapidSpell Desktop .NET
Returns suggestions menu items for the last right clicked word. Null/Nothing if none.
Declaration Syntax
C#Visual BasicVisual C++F#
public virtual MenuItem[] GetSuggestions()
Public Overridable Function GetSuggestions As MenuItem()
public:
virtual array<MenuItem^>^ GetSuggestions()
abstract GetSuggestions : unit -> MenuItem[] 
override GetSuggestions : unit -> MenuItem[] 
Return Value
array<MenuItem>[]()[][]
Remarks

See demo projects for an example.

An example usage; retreives suggestions menu items and uses them in a 3rd Party menu control.
 Copy imageCopy
MenuItem[] suggs;

TD.SandBar.ToolbarItemBase[] sandBarSuggs;

private void contextMenuBarItem1_BeforePopup(object sender, TD.SandBar.MenuPopupEventArgs e)
{

    this.contextMenuBarItem1.Items.Clear();
    suggs = this.rapidSpellAsYouType1.GetSuggestions();
    if(suggs!=null)//then we have suggestions
    {
        sandBarSuggs = new TD.SandBar.ToolbarItemBase[suggs.Length];
        for(int i=0; i<suggs.Length;i++)
            sandBarSuggs[i] = new TD.SandBar.MenuButtonItem(suggs[i].Text, new EventHandler(this.OnCMClick)); 

        this.contextMenuBarItem1.Items.AddRange(sandBarSuggs);
    } 
}

void OnCMClick(object sender, EventArgs e){
    //rapidspellasyoutype.OnPopUpClick expects the sender to be a MenuItem, so need to call
    //method with original item it produced
    for(int i=0;i<sandBarSuggs.Length; i++)    {

        if(sender == sandBarSuggs[i])
        {
            this.rapidSpellAsYouType1.OnPopUpClick(suggs[i], e);
        }
    }
}

Assembly: Keyoti.RapidSpell.NET2 (Module: Keyoti.RapidSpell.NET2.dll) Version: 4.6.1.204