[Module] TextEx - Extended TextGadget (All OS / DPI)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Module] TextEx - Extended TextGadget (All OS / DPI)

Post by davido »

@Thorsten1867,

Works perfectly on my MacBook, as expected.
Thank you very much. :D
DE AA EB
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Module] TextEx - Extended TextGadget (All OS / DPI)

Post by davido »

@Thorsten1867,
I didn't want to use a gradient colour but accidentally got one! I think there is a bug:

I specified a back colour to a TextEx gadget and later added the #Center flag to the Gadget definition. I got centred text but also the colour changed to a gradient :)
DE AA EB
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] TextEx - Extended TextGadget (All OS / DPI)

Post by Thorsten1867 »

Do you have a sample code?
I don't know how you could change the flag afterwards, as this is set when creating a gadget.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Module] TextEx - Extended TextGadget (All OS / DPI)

Post by davido »

@Thorsten1867,

Sorry it was not my intention to confuse.
The code below tested on MacBook.
The code below shows the difference between the Gadget definitions in lines 17 & 18.

Code: Select all

EnableExplicit


XIncludeFile "TextExModule.pbi"


#Window = 0
  #Text = 1
  #Font = 1
  
  Define Event.i
  
  LoadFont(#Font, "Arial", 11, #PB_Font_Bold)
  
  If OpenWindow(#Window, 0, 0, 180, 60, "Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
    
    TextEx::Gadget(111,10,10,160,18,"Some text")
    ;TextEx::Gadget(111,10,10,160,18,"Some text",TextEx::#Center)
    TextEx::SetColor(111,TextEx::#BackColor,$DDA0DD)
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
    
  EndIf
DE AA EB
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] TextEx - Extended TextGadget (All OS / DPI)

Post by Thorsten1867 »

Can't see the difference with me. :?:
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Module] TextEx - Extended TextGadget (All OS / DPI)

Post by davido »

@Thorsten1867,
I can assure you that the problem still exists on my MacBook.
I checked on one of my PC's. No problem, there.
DE AA EB
Post Reply