[PB 6.20 beta 2] EditorGadget no longer centres text
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Nobody read my post? What's wrong with using a centered TextGadget to show the text?
- marcoagpinto
- Addict

- Posts: 1076
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Ahhhhh... sorry... I have used your suggestion:BarryG wrote: Sun Dec 22, 2024 12:09 am Nobody read my post? What's wrong with using a centered TextGadget to show the text?
Code: Select all
t$=""+#LF$
t$+"Coded/Compiled using PureBasic "+current_version_purebasic$+" — "+current_release_date_purebasic$+#LF$
t$+Chr(34)+"Feel the ..Pure.. Power"+Chr(34)+#LF$+#LF$
t$+"© 1998–"+FormatDate("%yyyy", #PB_Compiler_Date)+" Fantaisie Software."+#LF$
t$+"www.purebasic.com"
TextGadget(#WEBGADGET_WINDOW_ABOUT,x,y,ImageWidth(#GLOBAL_IMAGE_ABOUT_PTG_PB_LOGO)-ImageWidth(#GLOBAL_IMAGE_ABOUT_PTG_PB_LOGO_Z)-10,ImageHeight(#GLOBAL_IMAGE_ABOUT_PTG_PB_LOGO_Z),t$,#PB_Text_Border|#PB_Text_Center)
SetGadgetColor(#WEBGADGET_WINDOW_ABOUT,#PB_Gadget_BackColor,#White)Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Just use the right tool for the job, was my point. You're showing non-editable plain text, so an EditorGadget makes no sense, and neither does a WebGadget because you're not showing HTML. The TextGadget does literally what you wanted, so...
The KISS principle.
-
Randy Walker
- Addict

- Posts: 1109
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Makes perfect sense if you do not want to block the user from copying text. Personally I hate when they do that, especially places like the About window. Just because they are allowed to access/modify the text does not necessarily mean they can make permanent changes unless you design it that way.BarryG wrote: Sun Dec 22, 2024 8:05 am Just use the right tool for the job, was my point. You're showing non-editable plain text, so an EditorGadget makes no sense, ...
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Anyone can copy any text they can see anyway. Heard of Microsoft PowerToys? It literally provides a tool for users to copy any text on the desktop. You can't stop them. Link -> https://learn.microsoft.com/en-us/windo ... -extractor
-
Randy Walker
- Addict

- Posts: 1109
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
No, can't say I ever heard of Microsoft PowerToys per say, but then I tend to stay away from Windows OS tweakers, so I don''t create problems as I did once long ago.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
-
Randy Walker
- Addict

- Posts: 1109
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Now that I followed your link on the text capture thing, I see it is supposed to be native to Windows but I tried (default: ⊞ Win+Shift+T but nothing happened.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
It's not native. You need to install PowerToys -> https://learn.microsoft.com/en-us/windows/powertoys/
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Please show me how you can show a http link inside of a TextGadget().BarryG wrote: Sun Dec 22, 2024 8:05 am Just use the right tool for the job, was my point. You're showing non-editable plain text, so an EditorGadget makes no sense, and neither does a WebGadget because you're not showing HTML. The TextGadget does literally what you wanted, so...The KISS principle.
Yes, you have to use the right tools and in this case, I, personally, would like also to present a link to the url.
So a WebGadget makes sense for me. (Better user experience)
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
You can't. But Marco wasn't doing that in his original code that he posted - he showed an URL in the EditorGadget, yes; but he wasn't making it clickable (or didn't show the code that did it). I can only go by what's posted.infratec wrote: Sun Dec 22, 2024 10:33 amPlease show me how you can show a http link inside of a TextGadget()
[Edit] I downloaded Marco's app to check, and yes, the PureBasic URL is not clickable, so a TextGadget would work fine for his needs.
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Yes ... not a good user experience
Like in the original 'About' of the PB IDE.
Fred should change this if he want more clicks to his page.
Like in the original 'About' of the PB IDE.
Fred should change this if he want more clicks to his page.
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
That's incorrect. It's possible (though complicated) and mback2k had posted this example in the German forum in 2008. I have just tested it and it's still working in Windows 10 22H2 x64 in PB 5.46 x86 and x64 in both ASCII and Unicode mode. In PB 5.73, 6.04 and 6.12 parts of the displayed text are missing but the HyperText links are still working. Unfortunately I currently don't have the time to adapt mback2k's code to the newer PB versions.
However, in oder to try mback2k's example you have to change 2 lines:
-
The outermost round bracket pair has to be removed:
Code: Select all
Words$ + (" " + StringField(Text$, Index, " "))Code: Select all
Words$ + " " + StringField(Text$, Index, " ") -
has to be changed to
Code: Select all
ElseIf Not Search$ And Line = IndexCode: Select all
ElseIf Search$ = "" And Line = Index
Re: [PB 6.20 beta 2] EditorGadget no longer centres text
The code in the german forum uses Windows API stuff.
The program, as I know, is platform independent.
The program, as I know, is platform independent.
