home *** CD-ROM | disk | FTP | other *** search
- #include <iframe.hpp>
- #include <iapp.hpp>
- #include <imle.hpp>
- #include <imsgbox.hpp>
- #include <icolor.hpp>
- #include <string.h>
- #include <stdio.h>
-
- main()
- {
- IFrameWindow *fw = new IFrameWindow(0x1000);
- IMultiLineEdit *mle = new IMultiLineEdit(0x1001,fw,fw,
- IRectangle(500,100));
- int i;
- char buf[10000];
-
- fw->setClient(mle);
- fw->setFocus();
- fw->show();
-
- buf[0] = 0;
- for (i=0; i<20; i++) {
- strcat(buf, "This is a test II\n");
- }
-
- {
- IMessageBox mb(fw);
- char msgbuf[1000];
- sprintf(msgbuf, "background: %8x", mle->color(IMultiLineEdit::background).asRGBLong());
- mb.show((char *)msgbuf, IMessageBox::informationIcon |
- IMessageBox::yesNoCancelButton |
- IMessageBox::applicationModal |
- IMessageBox::moveable);
- }
-
- mle->addLineAsLast(buf);
- mle->addLineAsLast(buf);
- mle->addLineAsLast(buf);
-
- for (i=0; i<20; i++) { mle->add("one"); }
- for (i=0; i<20; i++) { mle->addAsLast("one"); }
- for (i=0; i<20; i++) { mle->addLine("one",1); }
- for (i=0; i<20; i++) { mle->addAtOffset("one",0); }
-
-
- IApplication::current().run();
- }
-