Re: Once again about multiline StringGadget...
Posted: Mon Apr 05, 2010 7:52 am

http://www.purebasic.com
https://www.purebasic.fr/english/
Oh, mine... There just was no room for 'pretty-pretty-pretty please' in my first post. Well, not a big deal, since people aren't reading it anyways. Yes, I actually done that search. There was no single word about auto-hiding scrollbars, yet plenty of questions about word-wrap. So ? Just link me page where you found solution, if it's really there (which I doubt a lot).The sheer arrogance and rudeness just keeps coming. Can't you understand why nobody is helping you? Especially after you just linked to www.youfail.org ? Good luck with your programming endeavours. You're going to need it. You would've had your answer on the first day if you had asked nicely, or even if you had done the search that I told you. Amazing.
You've got that right, I'm posting, but I've read the unfriendly throwing of the word 'fail' and that'sLooks like that most of posters didn't actually even bothered to read my request.
And you're still asking for help...Oh, mine... There just was no room for 'pretty-pretty-pretty please' in my first post. Well, not a big deal, since people aren't reading it anyways. Yes, I actually done that search. There was no single word about auto-hiding scrollbars, yet plenty of questions about word-wrap. So ? Just link me page where you found solution, if it's really there (which I doubt a lot).
...So funny: whole thread about good manners and nobody even tried to observe one of main etiquette rules on forums: "read BEFORE posting".It’s first time when MSDN completely fails for me.
~~~~~~~~~~~~~~~Hello,
to me it never sounded 'rude', as I understood it as 'This is in vain, as the advice fails to deliver the result I'm wishing for'.
As Melissa searches via russian-google I think it's only an unhappy useing of the word. Still I stuck to join in as well, because the answers are much to short of information and don't allow any reasonings.
I did this several times and I investigated several hours to find out what you really meant and if there are any hints or solutions to find - (and the forum is quite filled with stringgadget - concerns)Melissa wrote:"read BEFORE posting"
Not really - just got used to it since AIB experience).But I'm sorry to realize now that it had been meant to be rude.
OK, let me state it's more clear:why can't your request be that comprehensive as your flames are now ?
Here again - a bit of sourcecode would have been easier to understand and handle for anybody.
Thanks, you first who got my question).Well, i've tried to read again your request and found out that you want to enable the scrollbar only when you need it. This can be done if there's a way to measure the string height and compare it with the window of the stringGadget. But, i've search through google and can't find anything about it. I Hope you'll find something useful. (This is only a tips for you).
Code: Select all
If OpenWindow(1, 40, 40, 400, 400, "Scrollbar Test", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_SizeGadget)
EditorGadget(1, 10, 40, 300, 300, #PB_Editor_ReadOnly)
SendMessage_(GadgetID(1), #EM_SETTARGETDEVICE, #Null, 0)
ButtonGadget(2,10,10, 80, 24, "MORE")
Repeat
Event=WaitWindowEvent(10)
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 2
SetGadgetText(1, GetGadgetText(1)+"This is another long line of text to see if scrollbars come up automatically."+#CRLF$)
EndSelect
EndSelect
Until Event=#PB_Event_CloseWindow
EndIf
EditorGadget(1, 10, 40, 300, 300, #PB_Editor_ReadOnly)
Yes - i need plain text I/O (no RTF at all) and #PB_EventType_Change.Has it GOT to be a StringGadget then?
Code: Select all
OpenWindow(0,0,0,320,330,"",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
StringGadget(0,10,10,300,65,"",#ES_MULTILINE|#WS_DLGFRAME|#WS_VSCROLL)
ShowScrollBar_(GadgetID(0),#SB_VERT,0)
Repeat
Select WaitWindowEvent()
Case #PB_Event_Menu
Case #PB_Event_Gadget
Select EventGadget()
Case 0
If SendMessage_(GadgetID(0),#EM_GETLINECOUNT,0,0) > 4
ShowScrollBar_(GadgetID(0),#SB_VERT,1)
ElseIf SendMessage_(GadgetID(0),#EM_GETLINECOUNT,0,0) < 5
ShowScrollBar_(GadgetID(0),#SB_VERT,0)
EndIf
EndSelect
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver