Page 1 of 2
Thank you Fred for a "good Bug" in PB 4
Posted: Sat Feb 04, 2006 9:52 pm
by heinz.goldbach
When i read the PB Readme i get a shock, because the Flag #PB_String_Multline is removed.
I´ve wrote a Software to get the Fishing Licence in Germany with more than 1000 Questions, Answers, Pictures, Movies etc.
The Windows Software is ready, Bug Free and tested.
The Software became published by Angelsport.de in Germany in April.
Now i am waiting for The Linux an Mac PB Update to get a right #PB_String_Multline function.
I Wrote a bug report because the LINUX version shows no Effect with the Flag.
Now the best:
I test a part of my Program with PB 4 Beta and i see #PB_String_Multline works good.
My Wishes:
1. Dont kill the Flag in PB 4.
2. If possible, LINUX and/or Mac with #PB_String_Multline (This day is Birthday an Christmas in One day).
PS. It seems PB 4 is great. PB is the best Software i ordered anytime.
Posted: Sat Feb 04, 2006 10:00 pm
by Berikco
The EditorGadget will do all you need, On Windows, Linux And Mac
Posted: Sun Feb 05, 2006 1:49 am
by El_Choni
I also don't understand very well why this flag was removed. In Windows, it's a feature of the Edit control, why remove it? There may be reasons not to use a Richedit control.
Posted: Sun Feb 05, 2006 1:55 am
by va!n
I think the same as El_Choni about the removed Multiline stuff!
Re: Thank you Fred for a "good Bug" in PB 4
Posted: Sun Feb 05, 2006 2:04 am
by PB
> When i read the PB Readme i get a shock, because the Flag #PB_String_Multline is removed
For Windows, just use #ES_MULTILINE instead.
I too don't want to use the EditorGadget, at least until it supports its own
cut/copy/paste/undo context menu (I'll be damned if I'm going to code it
myself for every EditorGadget).
Posted: Sun Feb 05, 2006 2:12 am
by freak
On Windows, this is a simple thing, as you just have to put an extra flag.
On linux/mac, it is different, because there are two different Widgets for single
and multiline.
The #PB_String_Multiline flag has existed on Windows only from a time when
there was no EditorGadget(). Since there is one, i see no more need for the flag.
If you want to keep using it on windows, you can just use the #ES_MULTILINE api flag.
This has only worked on Windows so far, and it continues to work with the api flag.
I do not see a problem here.
The EditorGadget does not have many differences from a multiline StringGadget. i don't see the problem.
Posted: Sun Feb 05, 2006 2:21 am
by PB
> The EditorGadget does not have many differences from a multiline
> StringGadget. i don't see the problem.
Check out these 3 major differences:
(1) SetGadgetText doesn't seem to work below.
(2) There is no right-click context menu.
(3) SetGadgetColor doesn't work with animations.
Items (2) and (3) are why I still prefer to use a StringGadget.
Code: Select all
If OpenWindow(0,300,300,350,250,#PB_Window_Invisible|#PB_Window_SystemMenu,"Editors")
CreateGadgetList(WindowID(0))
EditorGadget(0,10,10,330,100)
SetGadgetColor(0,#PB_Gadget_BackColor,RGB(0,255,0)) ; Should be green!
SetGadgetText(0,"No right-click context menu!") ; Text doesn't appear!
StringGadget(1,10,120,330,100,"Has a right-click context menu. :)")
SetGadgetColor(1,#PB_Gadget_BackColor,RGB(0,255,0)) ; Green.
AnimateWindow_(WindowID(0),1000,#AW_CENTER) : SetForegroundWindow_(WindowID(0))
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
Posted: Sun Feb 05, 2006 2:35 am
by El_Choni
Oh, yes, forgot about #ES_MULTILINE, sorry

Posted: Sun Feb 05, 2006 2:50 pm
by Nik
@PB lol in your example the text only appears after you marked it

Posted: Sun Feb 05, 2006 9:11 pm
by PB
@Nik: What do you mean?
Posted: Sun Feb 05, 2006 9:14 pm
by Trond
Exactly what he said. :roll: The EditorGadget text doesn't appear until it is selected.
Posted: Sun Feb 05, 2006 9:54 pm
by Dräc
In addition to the differences between a StringGadget and EditorGadget or TextGadget:
- EditorGadget: automatically generate scroll bars even if it’s not suitable (for a text just bordered)
- TextGadget: No click events retrieved
So, a Multi Lines flag on StringGadget is seem to be pertinent.
An trick given to me:
By declaring
#PB_String_MultiLine=4 on PBv4 codes,
this StringGadget option will
run as PBv3.94 
Posted: Sun Feb 05, 2006 11:11 pm
by PB
> Exactly what he said. :roll:
Well I didn't have access to PureBasic I asked that, so couldn't "select" it to
see. And I didn't know what he meant by "marked" either... maybe that's
the terminology they use in Germany for "selected"?
Posted: Sun Feb 05, 2006 11:26 pm
by Thorsten1867
Dräc wrote:EditorGadget: automatically generate scroll bars even if it’s not suitable (for a text just bordered)
Try this:
Code: Select all
SendMessage_(eg, #EM_SHOWSCROLLBAR, #SB_VERT, #False)
SendMessage_(eg, #EM_SHOWSCROLLBAR, #SB_HORZ, #False)
Posted: Sun Feb 05, 2006 11:37 pm
by freedimension
PB wrote:And I didn't know what he meant by "marked" either... maybe that's
the terminology they use in Germany for "selected"?
Good guess: "to select something" is called "etwas markieren" in german
