Jump to content

Label - mudar de linha.


t0ze

Recommended Posts

Boa noite pessoal. Estou com uma dúvida em relação às labels. É possivel apresentar uma label com 2 linhas de texto? como é q posso fazer a divisão?

Label y = new Label();

            y.Left = 128;

            y.Top = 345;

            y.BackColor = Color.White;

            y.Text = "Tentativa 1 Clique nas cores para fazer a sua tentativa";

Tentativa 1

(clique nas cores para fazer a sua tentativa)

Qualquer coisa deste genero.

tenho q usar a propriedade autosize???

Link to comment
Share on other sites

Viva,

antes de mais, bem vindo.

Uma forma simples de fazeres isso é usando a sequência de escape "\n" (sem aspas).

Exemplo:

Label y = new Label();

            y.Left = 128;

            y.Top = 345;

            y.BackColor = Color.White;

            y.Text = "Tentativa 1 \n (Clique nas cores para fazer a sua tentativa)";

Acho que é isto que pretendes, se não for desculpa.

Cumps. 😛

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.