Date: 02-16-2022
Return to Index
created by gbSnippets
Local style&
style& = %WS_Child Or %WS_Visible Or %ES_MultiLine Or %WS_VScroll Or %ES_AutoHScroll _
Or %WS_HScroll Or %ES_AutoVScroll Or %ES_WantReturn Or %ES_NoHideSel Or %WS_TabStop
'MultiLine with WordWrap. No vertical scrollbar and no vertical scroll
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%ES_AutoHScroll Or _
%ES_AutoVScroll Or _ '<--- enables scrolling but no scrollbar
%ES_MultiLine
'MultiLine with WordWrap. No vertical scrollbar and no vertical scroll
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%ES_MultiLine
'MultiLine without WordWrap. No horizontal scrollbar. No vertical scrollbar. No vertical scroll.
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%ES_AutoHScroll Or _ '<--- this is what disabled the wordwrapping
%ES_MultiLine
'MultiLine without WordWrap. Horizontal scrollbar. No vertical scrollbar. No vertical scroll.
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%WS_HScroll Or _ '<--- inserts horizontal scrollbar always
%ES_AutoHScroll Or _ '<--- this is what disabled the wordwrapping
%ES_MultiLine
'MultiLine without WordWrap. Vertical scroll but no scrollbar
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%ES_AutoHScroll Or _
%ES_AutoVScroll Or _ '<--- enables scrolling but no scrollbar
%ES_MultiLine
'MultiLine without WordWrap. No horizontal scrollbar. Vertical scroll and scrollbar
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%ES_AutoHScroll Or _
%WS_VScroll Or _ '<--- inserts Vertical scrollbar always
%ES_AutoVScroll Or _ '<--- enables scrolling but no scrollbar
%ES_MultiLine
'MultiLine without WordWrap. Horizontal scrollbar. Vertical scroll and scrollbar
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%WS_HScroll Or _ '<--- inserts horizontal scrollbar always
%ES_AutoHScroll Or _
%WS_VScroll Or _ '<--- inserts Vertical scrollbar always
%ES_AutoVScroll Or _ '<--- enables scrolling but no scrollbar
%ES_MultiLine
'MultiLine without WordWrap. No horizontal scrollbar. Vertical scroll and scrollbar
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _ '<--- optional, needed for manual editing
%ES_AutoHScroll Or _
%WS_VScroll Or _ '<--- inserts Vertical scrollbar always
%ES_MultiLine
'? Help: %WS_VScroll should be used in conjunction with %ES_Multiline and %ES_AutoVScroll
'But if I remove %ES_AutoVScroll, still works
'Constraints, per Help:
'%WS_VScroll should be used in conjunction with %ES_Multiline and %ES_AutoVScroll
'%ES_AutoVScroll must be combined with %ES_WantReturn and %ES_Multiline
'Orphan Styles:
%WS_Child '<--- inserted automatically by PowerBASIC
%WS_Visible '<--- inserted automatically by PowerBASIC
%ES_NoHideSel '<--- independent option. use anytime you want.
'Compilable Example: (Jose Includes)
#Compiler PBWin 10
#Compile Exe
#Dim All
%Unicode=1
Global hDlg As Dword
Function PBMain() As Long
Local style&, temp$, i As Long
'MultiLine horz/vert scroll. No scrollbars
style& = %WS_TabStop Or _
%WS_Border Or _
%ES_Left Or _
%ES_WantReturn Or _
%ES_AutoHScroll Or _ '<--- enables horz scrolling but no scrollbar
%ES_AutoVScroll Or _ '<--- enables vert scrolling but no scrollbar
%ES_MultiLine
Dialog New Pixels, 0, "TextBox Test",300,300,200,200, %WS_SysMenu, 0 To hDlg
Control Add TextBox, hDlg, 100,"", 50,50,100,120, Style&
For i = 1 To 100 : temp$ = temp$ + $CrLf + "Line" + Str$(i) : Next i
Control Set Text hdlg, 100, temp$
Dialog Show Modal hDlg
End Function
'gbs_00569
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm