Results 1 to 5 of 5

Thread: right align and listbox control

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,602

    right align and listbox control

    Hi all.
    I think this belongs here in Office rather than Database.

    I have a form in Access with a listbox control.
    At times, the listbox may be populated with data (values, not bound) that are Arabic.
    In those cases, the text should align right to left.

    I already have ReadingOrder set to Context, so the text displays in the proper direction (right to left), but it remains Left Justified. For Arabic readers, this is as annoying as would be an English article that was Right Justified.

    But as far as I can see, there is no TextAlign property for the Listbox control.

    I'm looking for a feasible workaround.

    I tried switching to a combobox, which does have text align, but I want to have several rows of data displayed, and with the combobox, stretching it out only makes the dropdown header row taller, not displaying more rows. Is there a setting on the cbox that will make it emulate an lbox? Or any other workaround for this? (seems like a major oversight from MS if not).

    Thanks.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: right align and listbox control

    I have Word not Access, as i can see ListBox also has TextAlign property.

    Try to set the form's RightToLeft property to True, it may help.



  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: right align and listbox control

    Under Format there should be an option for way of reading (I'm reading from a portuguese install here). Not sure it override the columns, never used it...
    Its the third option from the bottom of the format list (but you may have already tried this).

    Ah i see you have it - reading order. However context picks up the content (I think) so would apply the db rule. Under the file > options > config client there is a default direction option. Try changing that...
    Last edited by Ecniv; Jan 3rd, 2018 at 06:04 AM.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  4. #4

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,602

    Re: right align and listbox control

    my problem with settings changes is that the Arabic text only comes up occasionally. The rest of the time, the alignment should be left justified. Ideally, I need to adjust it programmatically.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  5. #5
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: right align and listbox control

    Ah hmm a bit more difficult in access. I've not done anything like it so if you happen to find the answer, post up - I'd be interested in how you did it.

    I think it is difficult because the list box doesnt run on separate lines, just the whole list. May be you you can have a button at the top to adjust the listbox to left to right or visa versa. Not sure it would work.

    If the text is a fixed width you might be able to pad the front with spaces.. a poor way of doing it though.

    In Word/excel there was a list box control (been a while since I used them) under form controls. you may be able to add a reference ad import that. If so from my vague memories you had control over the cells in the list/table and could allign them as you saw fit (ie for each line set the alignment depending on a field).

    Only memories - I may be wrong.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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