how to I get the A character highlight in the Keywords?

how to I get the A character highlight in the Keywords?

tranmanh1992
Contributor Contributor
890 Views
1 Reply
Message 1 of 2

how to I get the A character highlight in the Keywords?

tranmanh1992
Contributor
Contributor

I am writing a code in C# and need to add few options in the cmd line. 

for example :

pkeyopt.keywords.add("First")

pkeyopt.keywords.add("Second")

I only want to make The F highlight in "First"

or E in "Second"

See the pic for the example:

If anyone knows please show me how thanks.

I did try keywords[0].Displayname but it still shows the whole word.

Untitled.png

 

0 Likes
Accepted solutions (1)
891 Views
1 Reply
Reply (1)
Message 2 of 2

_gile
Consultant
Consultant
Accepted solution

Hi,

 

AutoCAD automatically highlights the uppercase successive characters in the keywords (they have to be different for each keyword.

 

            var ed = Application.DocumentManager.MdiActiveDocument.Editor;
            var options = new PromptKeywordOptions("\nChoose an option: ");
            options.Keywords.Add("First");
            options.Keywords.Add("sEcond");
            options.Keywords.Default = "First";
            var result = ed.GetKeywords(options);
            if (result.Status != PromptStatus.OK)
                return;
            ed.WriteMessage("\n" + result.StringResult);

keywords.png



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub