Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8919901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:08:18+00:00 2026-06-15T06:08:18+00:00

how to set text alignment of dynamically added label where i am getting name

  • 0

how to set text alignment of dynamically added label
where i am getting name of label in string variable
one label is dynamically added in panel

  Dim instance As New Label
  Dim stringVariable As String

on form load event ::

    instance.Location = New Point(15, 15)
    instance.Size = New Size(60, 30)
    instance.BorderStyle = BorderStyle.FixedSingle
    instance.AutoSize = False
    instance.Text = "LABEL1"
    Me.Panel1.Controls.Add(instance)

i am getting name by:

    for each c as control in Panel1.Controls
    stringVariable=c.name
    next

but its not possible to

   Me.Panel1.Controls(stringVariable).textalign ??????
   it does not show text align property

please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:08:18+00:00Added an answer on June 15, 2026 at 6:08 am
    DirectCast(Me.Panel1.Controls("Label1"), Label).TextAlign = ContentAlignment.TopRight
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How does one set the alignment of text within a chart legend object? I've
i'm new to j2me. how to set form elements (text field ,text box) width,font,alignment
I am using the following code to set the title label's text color, alignment
I want to set a text in a specific label on focus of an
How to set any plain text in Vertical Alignment in HTML?
Is there a simple way to set the text alignment of all cells in
I would like to set the vertical alignment of the label in the header
I have added one label in my nib file, then its required to have
I cannot find a way to set the text alignment in a QTabWidget. After
i have a problem, i want set text of a UILabel or UItextView or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.