It is currently Tue Jul 07, 2020 6:52 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [Module] ContainerEx - Module (all OS)
PostPosted: Sat Nov 16, 2019 12:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Extended Container Gadget - Module (all OS / DPI / 64Bit)

  • change background color
  • automatic gadget size adjustment
  • add title possible (similar to FrameGadget)
  • change text align, color and font possible
  • automatic adjustment of the border to the text size

Image _ _ _ Image

Code:
; ContainerEx::Close()              - similar to 'CloseGadgetList()'
; ContainerEx::DisableReDraw()      - disable redraw
; ContainerEx::Gadget()             - similar to 'ContainerGadget()'
; ContainerEx::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; ContainerEx::SetColor()           - similar to 'SetGadgetColor()'
; ContainerEx::SetFont()            - similar to 'SetGadgetFont()'
; ContainerEx::SetText()            - similar to 'SetGadgetText()'


Download: ContainerExModule.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 4:04 pm, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ContainerEx - Module (all OS)
PostPosted: Sun Nov 17, 2019 4:29 pm 
Online
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 203
Line 337: If IsWindow(ListEx()\Window\Num)

ListEx() not found


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ContainerEx - Module (all OS)
PostPosted: Sun Nov 17, 2019 5:46 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
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] ContainerEx - Module (all OS)
PostPosted: Tue Nov 19, 2019 9:27 am 
Online
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 203
Thorsten1867 wrote:
Fixed


still there :(

If you use Themes and SetText, the top border is not drawn correctly.


Btw... hide would be usefull ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ContainerEx - Module (all OS)
PostPosted: Tue Nov 19, 2019 1:15 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
There were actually still some hidden behind a CompilerIf.

_________________
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] ContainerEx - Module (all OS)
PostPosted: Tue Nov 19, 2019 2:12 pm 
Online
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 203
I mean a hide function.

the canvas is always drawn. If I make "HideGadget()" it's still drawn


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ContainerEx - Module (all OS)
PostPosted: Tue Nov 19, 2019 4:53 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update: Added ContainerEx::Hide()

_________________
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] ContainerEx - Module (all OS)
PostPosted: Wed Nov 20, 2019 10:15 am 
Online
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 203
In the dark theme and resize, its flickering really hard between white and blue.

I commented line 389 and I noticed, the gadget changed to white.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ContainerEx - Module (all OS)
PostPosted: Wed Nov 20, 2019 3:26 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Then it must be the original background color of the CanvasGadget. Obviously it will be deleted automatically when resizing.

_________________
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] ContainerEx - Module (all OS)
PostPosted: Thu Nov 21, 2019 11:42 am 
Online
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 203
Found a flickering Solution...

I added additionally on line 518: BindGadgetEvent(ContainerEx()\CanvasNum, @_ResizeHandler(), #PB_EventType_Resize)

now, everything is smooth


on line 283, I changed to: RoundBox(X, Y, Width, Height,8,8, ContainerEx()\Color\Border)
This looks cool... maybe it is a good theme option?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ContainerEx - Module (all OS)
PostPosted: Thu Nov 21, 2019 3:00 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update:
  • Added: Attribute '#Corner'
  • Fixed resizing

_________________
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  [ 11 posts ] 

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