Re: [PB 6.20 beta 2] EditorGadget no longer centres text
Posted: Sun Dec 22, 2024 12:09 am
Nobody read my post? What's wrong with using a centered TextGadget to show the text?
http://www.purebasic.com
https://www.purebasic.fr/english/
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)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, ...
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.
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()
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.
Code: Select all
Words$ + (" " + StringField(Text$, Index, " "))Code: Select all
Words$ + " " + StringField(Text$, Index, " ")Code: Select all
ElseIf Not Search$ And Line = IndexCode: Select all
ElseIf Search$ = "" And Line = Index