Textarea without scrollbars

BlitzMax Forums/MaxGUI Module/Textarea without scrollbars

plash(Posted 2008) [#1]
I know your probably saying "textfield" right about now, but I have to use a textarea. Is there a way to disable the scroll bars on a textarea?


skn3(Posted 2008) [#2]
Textfield!

ho ho ho.

couldnt you try sending some windows messages to the textarea control. I think there are some there to hide/show scrollbars?


plash(Posted 2008) [#3]
I think theres EM_ constants for textbox's, but I havent been able to find them.


rs22(Posted 2008) [#4]
This hides the scrollbar. Change "SB_VERT" to "SB_HORZ" to hide the horizontal scrollbar. Change the last parameter to True to show the scrollbar.
Local hWnd = QueryGadget(textarea, QUERY_HWND)
SendMessageA(hWnd, EM_SHOWSCROLLBAR, SB_VERT, False)

http://msdn2.microsoft.com/en-us/library/bb787605(VS.85).aspx


plash(Posted 2008) [#5]
Thanks.


danielos(Posted 2008) [#6]
it works, but how can it be done that the cursor/text automatically goes into the next line if it reaches the end of a line ?


jsp(Posted 2008) [#7]
You can simply switch on the WordWrap for the TextArea:
Local TextArea:TGadget = CreateTextArea:TGadget(100,90,150,120,Window:TGadget,TEXTAREA_WORDWRAP)



Grisu(Posted 2008) [#8]
Is there a way to do this with Listboxes as well?
Is there a cross platform solution?

What type is "hWnd"? Long, Int? - I'm using superstrict mode.


SebHoll(Posted 2008) [#9]
What type is "hWnd"? Long, Int? - I'm using superstrict mode.

It's an Integer. ;-)


Grisu(Posted 2008) [#10]
Thanks! Anyway, the fix above doesn't seem to work on listboxes...