Add text bullets to a C# form

后端 未结 5 1052
梦如初夏
梦如初夏 2021-02-08 17:41

I am creating a form in C# and need to display text on the form. I need some of the text to show up in a bulleted, unordered list. Is it possible to do this while using a label?

5条回答
  •  借酒劲吻你
    2021-02-08 18:21

    Just to add as a suggestion to the OP, I have found that using a StringBuilder to construct multi-line messages helps me keep the formatting straight:

    StringBuilder messageBuilder = new StringBuilder(200);
    
    messageBuilder.Append("To continue, please select one of the actions below:");
    messageBuilder.Append(Environment.NewLine);
    messageBuilder.Append(Environment.NewLine);
    messageBuilder.Append("\t\u2022 Click Button A to do this action.");
    messageBuilder.Append(Environment.NewLine);
    messageBuilder.Append("\t\u2022 Click Button B to do this action.");
    
    MessageBox.Show(messageBuilder.ToString());
    

提交回复
热议问题