
Once again about multiline StringGadget...
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: Once again about multiline StringGadget...

Re: Once again about multiline StringGadget...
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.
- Crusiatus Black
- Enthusiast
- Posts: 389
- Joined: Mon May 12, 2008 1:25 pm
- Location: The Netherlands
- Contact:
Re: Once again about multiline StringGadget...
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.
when I decide not to even look any further into the original subject.
I now might fail in your eyes, but hey, ethics fail in your eyes aswell.
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).
I would advice you to read some MSDN articles on the subject, you can probably search the MSDN networks
right? Well, search there and you might find something. This is constructive advice, I don't expect a 'fail' back
from you now

Re: Once again about multiline StringGadget...
Now I would be very, very rude, quoting my first post:
No, I got one more request: please, people, tell me what I asked about in this thread ? Really interested to hear your guesses.
...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.
No, I got one more request: please, people, tell me what I asked about in this thread ? Really interested to hear your guesses.
Re: Once again about multiline StringGadget...
This is what I wanted to post some minutes ago:
But I'm sorry to realize now that it had been meant to be rude.
@Melissa
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.
@All
HHEM -
- (Happy Holy Easter Monday)
cheers ~ Vera
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~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.
But I'm sorry to realize now that it had been meant to be rude.

@Melissa
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.
@All
HHEM -

cheers ~ Vera
~~~~~~~~~~~~~~~
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"
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
Re: Once again about multiline StringGadget...
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).
Re: Once again about multiline StringGadget...
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.
1) I know how to make multiline StringGadget.
2) I know how to add scrollbars to it.
3) I know how to add word-wrapping to StringGadget.
4) I want to know how to do this, but for more 'stationary' (^^) Windows and writeable StringGadget.
...Is it really so much ?
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).
Re: Once again about multiline StringGadget...
I think this does what you want, and it's quite simple.
If it doesn't then I may have mis-understood what you want.
EDIT:
If you want an editable StringGadget, just remove the ', #PB_Editor_ReadOnly' from the Gadget creation line.
If it doesn't then I may have mis-understood what you want.
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
If you want an editable StringGadget, just remove the ', #PB_Editor_ReadOnly' from the Gadget creation line.
%101010 = $2A = 42
Re: Once again about multiline StringGadget...
It's nearly is, except for one little problem - I need StringGadget, not:
EditorGadget(1, 10, 40, 300, 300, #PB_Editor_ReadOnly)
Re: Once again about multiline StringGadget...
If you just removed the "#PB_Editor_ReadOnly" then?


The best preparation for tomorrow is doing your best today.
Re: Once again about multiline StringGadget...
Oops
Has it GOT to be a StringGadget then?
Or can you use the EditorGadget?

Has it GOT to be a StringGadget then?
Or can you use the EditorGadget?
%101010 = $2A = 42
Re: Once again about multiline StringGadget...
Yes - i need plain text I/O (no RTF at all) and #PB_EventType_Change.Has it GOT to be a StringGadget then?
Re: Once again about multiline StringGadget...
For the #PB_EventType_Change check out this thread http://www.purebasic.fr/english/viewtop ... ype_Change
I'm sure you can do an EditorGadget that display just unformatted text.
check out this thread http://www.purebasic.fr/english/viewtop ... t+raw+text
Hope these solve your probs.
I'm sure you can do an EditorGadget that display just unformatted text.
check out this thread http://www.purebasic.fr/english/viewtop ... t+raw+text
Hope these solve your probs.
%101010 = $2A = 42
Re: Once again about multiline StringGadget...
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
Egypt my love
Re: Once again about multiline StringGadget...
2Perkin: Well, looks like that it's only way. However, I'm kinda worried about maximal capacity of EditorGadget... Also it lacks context menu.
2RASHAD: I need sizeable gadget here.
2RASHAD: I need sizeable gadget here.
Last edited by Melissa on Mon Apr 05, 2010 12:12 pm, edited 1 time in total.