It is currently Thu May 28, 2020 4:45 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Mar 08, 2019 5:24 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
TextEx Gadget - Module (All OS / DPI)

  • Background with color gradient
  • Multiline text
  • DPI support
  • Automatic size adjustment (#MoveX|#MoveY|#ResizeWidth|#ResizeHeight)

Image

Code:
; TextEx::Gadget()             - similar to 'TextGadget()'
; TextEx::GetColor()           - similar to 'GetGadgetColor()'
; TextEx::GetText()            - similar to 'GetGadgetText()'
; TextEx::SetColor()           - similar to 'SetGadgetColor()'
; TextEx::SetFont()            - similar to 'SetGadgetFont()'
; TextEx::SetText()            - similar to 'SetGadgetText()'
; TextEx::SetAutoResizeFlags() - [#MoveX|#MoveY|#ResizeWidth|#ResizeHeight]


Download: TextExModule.pbi

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Fri Dec 20, 2019 3:37 pm, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Mar 08, 2019 8:01 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 766
Location: Nottinghamshire UK
Thank you Thorsten1867 yet another very useful addition :)

Zebuddi.

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Mar 08, 2019 9:23 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 190
This is cool...

Really thanks you


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Sun Mar 10, 2019 7:08 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4678
Location: Lyon - France
Works fine
Thanks for sharing 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Tue Nov 19, 2019 10:21 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 190
Now, its missing the Themes :)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Tue Nov 19, 2019 1:32 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Fixed

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Dec 27, 2019 12:24 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 06, 2008 12:54 pm
Posts: 390
Location: Brisbane, Qld, Australia
How do I get AutoResize to work? The example includes the line:

Code:
;TextEx::SetAutoResizeFlags(#Text, TextEx::#MoveY|TextEx::#ResizeWidth)

but if I remove the ; comment marker the results are still the same, with the displayed gadget still being 170 pixels wide.
(Using TextExModule version 19120800 with PB 5.71 LTS 64-bit under Windows 10)

_________________
Mike
www.showcuesystems.com


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Dec 27, 2019 10:40 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
I can't find a problem.

Image

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Dec 27, 2019 1:37 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 06, 2008 12:54 pm
Posts: 390
Location: Brisbane, Qld, Australia
I misunderstood the purpose. I was expecting the gadget to be resized to match the required size, eg to match #PB_Gadget_RequiredSize.

How can I resize the gadget myself? It doesn't seem to have a SetWidth or Resize function (similarly for other modules).

_________________
Mike
www.showcuesystems.com


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Dec 27, 2019 7:26 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
ozzie wrote:
I misunderstood the purpose. I was expecting the gadget to be resized to match the required size, eg to match #PB_Gadget_RequiredSize.

How can I resize the gadget myself? It doesn't seem to have a SetWidth or Resize function (similarly for other modules).


Code:
ResizeGadget()

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Fri Dec 27, 2019 11:49 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 06, 2008 12:54 pm
Posts: 390
Location: Brisbane, Qld, Australia
Thanks. I didn't realise these native PB functions would work on the modules, but on checking this I see you use BindGadgetEvent() calls to catch and process these native functions. Brilliant!

_________________
Mike
www.showcuesystems.com


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Sat Dec 28, 2019 11:14 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Update: TextEx::AdjustSize()

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Mon Feb 24, 2020 9:34 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1758
Location: Uttoxeter, UK
@Thorsten1867,

Module TextEx
#Version = 19122900
#ModuleEx = 19112102

I have been using TextEx on my MacBook and have discovered a minor problem with your example:
The box with rounded corners appears to have rectangular box beneath it.

Also I have a question:
Is there some way making the text wrap if it is longer than the box, when #Multiline is specified?

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Tue Feb 25, 2020 11:00 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Added: #GadgetColor for SetColor()

Quote:
The box with rounded corners appears to have rectangular box beneath it.

This will delete the content of the CanvasGadget (= background color), if you have changed the background color, you can adjust it with #GadgetColor.

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TextEx - Extended TextGadget (All OS / DPI)
PostPosted: Tue Feb 25, 2020 11:47 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
davido wrote:
Is there some way making the text wrap if it is longer than the box?

Update: #WordWrap added

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 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