Thank you Fred for a "good Bug" in PB 4

Everything else that doesn't fall into one of the other PB categories.
heinz.goldbach
User
User
Posts: 25
Joined: Mon Dec 12, 2005 8:35 pm
Location: Neuss - Germany

Thank you Fred for a "good Bug" in PB 4

Post 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.
Intel i3, 8 GB RAM, 2*200 GB HDD, Windows 7 64bit
SUSE LINUX 10.1
Mac G4, OSX 10.4.11, 80 GB HDD, 1,5 GB RAM
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

The EditorGadget will do all you need, On Windows, Linux And Mac
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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.
El_Choni
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

I think the same as El_Choni about the removed Multiline stuff!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Thank you Fred for a "good Bug" in PB 4

Post 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).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.
quidquid Latine dictum sit altum videtur
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Oh, yes, forgot about #ES_MULTILINE, sorry :oops:
El_Choni
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

@PB lol in your example the text only appears after you marked it :twisted:
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

@Nik: What do you mean?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Exactly what he said. :roll: The EditorGadget text doesn't appear until it is selected.
Dräc
Enthusiast
Enthusiast
Posts: 150
Joined: Sat Oct 09, 2004 12:10 am
Location: Toulouse (France)
Contact:

Post 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 ;)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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"?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post 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)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post 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 ;)
<°)))o><²³
Post Reply