VB: why doesn't text alignment work in text box?

VB: why doesn't text alignment work in text box?

Post by Cust » Thu, 09 Sep 1993 01:37:24



Using VB3.0 no matter what I set the text alignment to in a text box I get
left aligned text.  The help file says that center alignment only works in
WIN3.1 (it will left align in 3.0) but I'm running 3.1 and right align doesn't
work either and I've tried it on several machines. Any Ideas?

(p.s. I'm using the Arial TT font and it works for label controls but not for
text boxes)

Thanks for any help...
please respond by email
Todd Custer
Raytheon Company
Portsmouth, RI

 
 
 

VB: why doesn't text alignment work in text box?

Post by Paul Kohlmill » Fri, 10 Sep 1993 01:52:04


Set multiline to true. I don't know if this is the way it is
supposed to work or what.
--
     // Paul H. Kohlmiller             //  "*s, Macs and Mips"    //

     // Acronym under construction.  // America Online: Paul CDC    //
     // All comments are strictly my own. I won't lie but my       //
     // perception of reality is at best a personal hunch.        //

 
 
 

1. From a text book and it doesn't work why??

Please explain to me whay this doesn't work.

the line length in the file is over 32.

This code was copied out of a book and doesn't work.
If I set line length to 81 it reads the file in and exits.
If I leave the line length at 32 it goes to end of file and exits.

//  Prints a file,
//    doesn't work splitting the lines that are longer than LINELENGTH.
#include <stdlib.h>
#include <iostream.h>
#include <fstream.h>

const int LINELENGTH = 32;  // 32 characters per line

int main()

{
    char fileName[40];
    char line[LINELENGTH+1];   // +1 for the terminating null

    cout << "File name: ";
    cin >> fileName;           // Read one word into filename.

    ifstream f1(fileName);     // Open file for reading
    if (!f1) {
        cout << "Cannot open " << fileName << ".\n";
        system("pause");
        return 1;
    }

    // Read lines while available (until the end of file).
      while (f1.getline(line, LINELENGTH+1)) {
        cout << line << endl;
        system("pause");
    }

    cout << "*** END OF FILE ***\n";
    system("pause");
    return 0;

Thanks in advance,

Puzzled

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

2. 501 error: DNS or Sendmail?

3. Text attributes in a VB text Box

4. Button Size Problem inside Theme Shared Border

5. WHY WHY WHY doesn't this code work?

6. As Seen On TV!! 50K in 90 Days!! Its True!

7. drop down list box - doesn't drop, doesn't list, doesn't remember.

8. Developer Available

9. Why doesn't this work under a VC++ 6.0 'release' build?

10. Setting alignment for the first column in CListCtrl doesn't work.

11. TSP: unexpected UI works with TB20 but doesn't work with TB3x...Why?

12. combo box text alignment

13. Q: Why doesn't Custom AppWizard's work with ClassWizard?