Subject: How to set the multiline property at run time?
Posted By: harini19 Post Date: 1/6/2004 6:34:57 AM
How to set the multiline property or ScrollBars of the text control at run time?

Reply By: Jeff Mason Reply Date: 1/6/2004 7:29:25 AM
textbox.multiline=true

textbox.scrollbars=<value>
where <value> is vbSBNone, vbHorizontal, vbVertical, or vbBoth.

the multiline property must be true for you to set a value other than vbSBNone


Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply By: Jeff Mason Reply Date: 1/7/2004 10:27:11 AM
My response to this was in error.  In VB6, both the multiline and scrollbars properties are read-only at run time, so they cannot be set.

The only way to do this, that I know of, is to create multiple textboxes, one for each combination of possible properties, and make the desired one visible and the others not visible at run time.

This is perhaps best encapsulated into a custom OCX.

Sorry for the error.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply By: marcostraf Reply Date: 1/9/2004 2:52:02 PM
Scrollbars are added to the window at creation time, therefore it is not that easy to change the Multiline property at run time. BTW why do you need it? My advise is to load two texboxes, a normal and a multine, put them ot top of each other and hide/show (or zorder) the one you need at that moment)

Marco

Go to topic 8380

Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963