Results 1 to 3 of 3

Thread: RightToLeft Alignment dosn't work when assigned to (Application Settings)

  1. #1

    Thread Starter
    Hyperactive Member Joye's Avatar
    Join Date
    Jul 2009
    Posts
    256

    RightToLeft Alignment dosn't work when assigned to (Application Settings)

    On my form there are two textboxes called (Subject1) & (detail1)
    When using the flowing code without assigning the them to (Application Settings) they work fine and I can set them at run time to left or right. But after assigning them to (Application Settings) the don't seem to be responding to the button click.

    Code:
    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
            Subject1.RightToLeft = RightToLeft.Yes
            Subject1.TextAlign = HorizontalAlignment.Right
            Detail1.RightToLeft = RightToLeft.Yes
            Detail1.TextAlign = HorizontalAlignment.Right
        End Sub
    
    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
            Subject1.RightToLeft = RightToLeft.No
            Subject1.TextAlign = HorizontalAlignment.Left
            Detail1.RightToLeft = RightToLeft.No
            Detail1.TextAlign = HorizontalAlignment.Left
        End Sub
    I don't know what exactly is going on ?!!

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,152

    Re: RightToLeft Alignment dosn't work when assigned to (Application Settings)

    Quote Originally Posted by Joye View Post
    But after assigning them to (Application Settings) the don't seem to be responding to the button click.
    What does that mean exactly? What assignments? Are you talking about binding the properties to settings in the designer? What does "not responding" mean? Are you saying that you can debug that code and watch each line get executed but the appearance doesn't change? Why exactly are you using RightToLeft in the first place? You know that it is intended for correct display of languages that are read from right to left, e.g. Arabic, right? I ask because someone else was misusing it recently and, if you're using it properly, there doesn't seem to be good reason to be changing it with a Button Click while not changing the Font.

  3. #3

    Thread Starter
    Hyperactive Member Joye's Avatar
    Join Date
    Jul 2009
    Posts
    256

    Re: RightToLeft Alignment dosn't work when assigned to (Application Settings)

    Quote Originally Posted by jmcilhinney View Post
    What does that mean exactly? What assignments? Are you talking about binding the properties to settings in the designer? What does "not responding" mean? Are you saying that you can debug that code and watch each line get executed but the appearance doesn't change? Why exactly are you using RightToLeft in the first place? You know that it is intended for correct display of languages that are read from right to left, e.g. Arabic, right? I ask because someone else was misusing it recently and, if you're using it properly, there doesn't seem to be good reason to be changing it with a Button Click while not changing the Font.
    I have 2 textboxes are meant to be used for two Languages and one of them should be right to left and the other is English so at run time user can decide what language he wants to use and for that he will change that from his keyboard but textbox in that case will remain left to right and I want him at this point to click to align the text in textbox.

    What happens is before I start binding the properties to settings everything is okay and in run time by clicking the button texts get aligned but after binding the RightToLeft & TextAlign properties to settings it just dosen't get Aligned.

    By the way I have two buttons, one for right Alignment and the other for left Alignment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width