|
-
Oct 28th, 2000, 05:28 PM
#1
How come in Windows NotePad, when you click "Word Wrap" off,
it adds a horizontal scroll bar, but when I tried to emulate that, it has an error saying that I can't change a read-only property(i.e. - scrollbar orientation)?
How would I do that then?
-
Oct 28th, 2000, 05:53 PM
#2
Hyperactive Member
I'm not really sure what yuo mean but I think this would help... :
Code:
Text1.Scrollbars = x
'Replace x with one of the following:
'0 = None
'1 = Horizontal
'2 = Vertical
'3 = Both
-
Oct 28th, 2000, 05:56 PM
#3
_______
<?>
You can add or change scrollbars and properties at design time only.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 28th, 2000, 07:14 PM
#4
so how does NotePad do it??
-
Oct 28th, 2000, 07:47 PM
#5
Frenzied Member
What about having two textboxes.
That you assign one textbox the wrap thing but not to the other one.
Now every time the user switches you assing the other textbox the text of the one that was active. than you make one of them invisible. (I know it isn't perfect, but it will work, you can clear the one of those box that isn't active, to save memory)
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 28th, 2000, 07:49 PM
#6
I was thinking about that, I guess that's how its going to have to be.
-
Oct 28th, 2000, 11:47 PM
#7
Frenzied Member
tell me if it worked out fine when you are done.
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 30th, 2000, 04:54 AM
#8
Junior Member
notepad does it this way
If you use toolz like spy++ and spy notepad, you'll see that it uses two edit-ctrls, cause there are two different hwnds!
/\/\isanThr0p: HA! MAL N DEUTSCHER BEI VBWORLD...
Currently using VB6 Enterprise, but VC++ is much better for API (  )!
-
Oct 30th, 2000, 06:15 PM
#9
Frenzied Member
Hehe ich habe im Ganzen forum nur 4 deutsche Ausmachen keonnen, von denen einer aus der Schweiz ist lol!
Sorry ppl! I couldn't resist! I'm really wondering why microsoft didn't just code a new textbox, instead of just giving a real simple thing that wastes memory! I don't think it cares a lot, but if they do it with all their stuff like this...
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 30th, 2000, 06:30 PM
#10
Re: <?>
Originally posted by HeSaidJoe
You can add or change scrollbars and properties at design time only.
I'm here to prove you wrong Wayne .
Scrollbars can be hidden or shown during runtime.
Code:
Private Declare Function ShowScrollBar Lib "user32" _
(ByVal hwnd As Long, ByVal wBar As Long, _
ByVal bShow As Long) As Long
Private Const SB_BOTH = 3
Private Const SB_HORZ = 0
Private Const SB_VERT = 1
Private Sub Command1_Click()
ShowScrollBar Text1.hwnd, 3, False
End Sub
Private Sub Command2_Click()
ShowScrollBar Text1.hwnd, 3, True
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|