It is currently Tue Jan 26, 2021 7:42 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 2:16 pm 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1212
First post edited to show that it's not due to making a table with the strings.


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 5:03 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1791
Location: Germany
In Windows 10 with PB 5.73 Beta 4 you have to enable SES_EX_NOTABLE before displaying text in the Editorgadget. Fred should implement this when creating an EditorGadget. It doesn't do any harm in PB 5.72.

After enabling SES_EX_NOTABLE in the EditorGadget, BarryG's and infratec's examples work like a charm in PB 5.73 Beta 4:
Code:
#EM_SETEDITSTYLEEX = #WM_USER + 275
#SES_EX_NOTABLE = 4

OpenWindow(0,200,200,100,100,"test",#PB_Window_SystemMenu)
EditorGadget(0,10,10,80,80)
SendMessage_(GadgetID(0), #EM_SETEDITSTYLEEX, #SES_EX_NOTABLE, #SES_EX_NOTABLE)
AddGadgetItem(0,-1,"+-+")
AddGadgetItem(0,-1,"WTF")
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow

Code:
#EM_SETEDITSTYLEEX = #WM_USER + 275
#SES_EX_NOTABLE = 4

OpenWindow(0,200,200,200,100,"test",#PB_Window_SystemMenu)
EditorGadget(0,10,10,180,80)
SendMessage_(GadgetID(0), #EM_SETEDITSTYLEEX, #SES_EX_NOTABLE, #SES_EX_NOTABLE)

AddGadgetItem(0,-1,"+----------+")
AddGadgetItem(0,-1,"| C64 Maze |")
AddGadgetItem(0,-1,"+----------+")

Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 5:09 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3381
Location: Boston, MA
NOT A BUG.
But this is an updated RichEdit Control and should be mentioned in "What's New" for v573.
I like the new features exposed in the newer control.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 5:27 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 587
Location: Near Hamburg
I don't think it's ok if you first have to switch the new editor gadget to the old behaviour by API commands.
Maybe the editor gadget could get some new flags to enable or control the features of the new rich edit control.

_________________
PB 5.73 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 52y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 5:48 pm 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3967
Location: Berlin, Germany
kurzer wrote:
I don't think it's ok if you first have to switch the new editor gadget to the old behaviour by API commands.

I agree. That wouldn't be good, and it would break existing code.
Therefore Shardik's solution should be applied by Fred internally in PureBasic.

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 7:52 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3838
Maybe Fred can make it as a user choice between edit ver 3.0 or ver 4.1
Anyhow BarryG is making a lot of troubles these days :mrgreen:

_________________
Egypt my love


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 9:43 pm 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1212
skywalk wrote:
NOT A BUG.

Really? So the user isn't allowed to add "+-+" as plain ASCII to an EditorGadget now? How do I explain that to my users? Using "+-+" to format ASCII tables around text is a decades-old PC tradition.

Anyway, Shardik's solution is the answer (thank you so much!), and I agree that Fred should make this an optional flag, something like:

Code:
EditorGadget(0,10,10,80,80,#PB_Editor_NoTables)

Which would then apply the #SES_EX_NOTABLE to it. Please do this, Fred, so it doesn't break existing EditorGadgets like it has for my app.

RASHAD wrote:
BarryG is making a lot of troubles these days :mrgreen:

I can't help it if my app doesn't work anymore from the previous Final to the new Betas. That's what beta-testing is for. ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Sun Nov 15, 2020 10:07 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Apr 05, 2020 11:28 am
Posts: 425
Location: Pandora
Well, I would never have noticed that an ImageGadget() with a transparent image
does not work on a ButtonGadget() anymore, because I would never do that.
In this respect some unusual codes are already useful.
And he tries to help everyone.

You did a good job Barry !

_________________
地球上の平和


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Mon Nov 16, 2020 3:28 am 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3381
Location: Boston, MA
BarryG - I said it is a bug in the documentation. Did you read the link to MS rich edit control?

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Mon Nov 16, 2020 10:02 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1212
Yes, I read the link. I see what you mean by "bug" now (after re-reading your post with a clearer mind). Still, the user should be able to add any text without fear that the EditorGadget isn't going to reformat it to what it thinks you want.


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget regression
PostPosted: Mon Nov 16, 2020 2:28 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
Fixed, thanks for the investigation Shardik


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye