Вопрос

In more recent Delphi versions it is possible to use code completion to code all the cases in a case statement at once, for e.g. enumerated types.

But whatever I try, I can't get it to work. What should I start to type, then what hotkey to use? Maybe I'm missing a Tools/Options setting, although I don't suspect that, because it's a manual operation.

Это было полезно?

Решение

Exit the case variable field with a Tab and the IDE will auto-complete the case options if your variable is of a enumerated type.

typing a case statement

  1. In the proper place in the code editor Type case space
  2. The IDE adds a case template and presents a blue rectangle field where you type the variable name for the case statement
  3. Write the name of that variable and
  4. Exit the field with the Tab key
  5. The IDE adds all the enum values to the case template.

enter image description here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top