PlanetSquires Forums

Support Forums => WinFBE - Code Editor and Visual Designer => Topic started by: SeaVipe on February 09, 2020, 01:56:23 PM

Title: WinFBE 2.0.3 - StatusBar
Post by: SeaVipe on February 09, 2020, 01:56:23 PM
Hi Paul, Will it be possible for the StatusBar control to have individual panel font colouring?
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Paul Squires on February 09, 2020, 02:25:44 PM
Hi Clive, I don't think so unless I change the control to be owner draw. I don't really want to do that at this point but it is something that has been on my mind because using different colors, fonts, etc for the panels would be good.

Also, last night I fixed a problem whereby the Width and MinWidth properties of the Panels was not code generating correctly.
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: SeaVipe on February 09, 2020, 03:08:14 PM
Hi Paul, setting the Panel widths and StatusBar font in the form's initialization routine is working nicely. Alignment can be overcome with string padding. BorderStyle although aesthetically pleasing, is not essential for my purposes (I recall that was addressed in your note about theme support).
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Paul Squires on February 10, 2020, 08:30:54 AM
Hi Clive, I have changed the StatusBar to now be owner draw so I am able to draw each individual panel using colors and fonts. I'll have it all ready for the next update.
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Josť Roca on February 10, 2020, 08:46:27 AM
Hope it is optional. Some like to use Visual Styles...
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Paul Squires on February 10, 2020, 01:27:01 PM
That's a good point. However, I am not seeing much of any difference between the two types given that owner draw only paints the panel rather than the whole control and separators. I'll keep a watch for any significant differences.
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Paul Squires on February 17, 2020, 12:54:12 PM
It has been a while since I posted an update. Just to let you folks know, I have been working on the code (especially the StatusBar), and I'm getting close to being able to upload and update. Here is what I have cooking so far for the 2.0.4 update:

- Added: UpDown control.
- Changed: StatusBar Panels are now OwnerDraw which allowed for defining Fore/ForeHot/Back/BackHot Colors, on a per-Panel basis.
- Changed: Use of StatusBar BorderStyle is now deprecated as it has no effect in WinFBE programs where Windows Themes are enabled.
- Changed: StatusBar Panel ToolTips now act like regular tooltips and are not restricted by the limitations per the SB_SETTIPTEXT Win32 message documentation.
- Changed: New Chinese lanuage file thanks to ganlinlao.
- Fixed: Regression in WinForms code whereby KeyDown, KeyUp and KeyPress fired twice instead of once.
- Fixed: ListView possible GPF when invoking Items Clear method (disabled redraw of ListView to prevent accessing a now deleted Item).
- Fixed: The Width and MinWidth properties of StatusBar Panels were not being generated in code correctly.
- Fixed: StatusBar Panels with AutoSize set to Contents were not calculating space needed for any associated Panel image.
- Fixed: An assigned Button control Image would not necessarily display the correct size at design time.
- Fixed: StatusBar Panel with AutoSize set to Spring can now be any panle (not just the last panel). However, only one panel can be designated as Spring.

Title: Re: WinFBE 2.0.3 - StatusBar
Post by: SeaVipe on February 17, 2020, 01:00:14 PM
Thanks, Paul, much appreciated!
Title: Re: WinFBE 2.0.5 - StatusBar
Post by: SeaVipe on February 20, 2020, 09:21:54 PM
Hi Paul,
The StatusBar is not updating each time Panel(n).Text is modified. The first text change is ignored but after that it appears to be ok. I can't determine the exact issue without further testing which I'll do tomorrow.
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Paul Squires on February 20, 2020, 10:14:02 PM
Thanks Clive - I will test it also. Sounds like a redraw issue.
Title: Re: WinFBE 2.0.3 - StatusBar
Post by: Paul Squires on February 21, 2020, 09:24:32 AM
This is now fixed. Here is the correct version:

Code: [Select]
property wfxStatusBarPanel.Text( byref wszValue as wstring )
   _Text = wszValue
   if this.hWindow then this.Refresh
end property

As you can also see, I have added a Refresh method for the StatusBar Panel class. This allows only the Panel to be redrawn rather than the whole statusbar (which causes a bit of flicker).
Code: [Select]
function wfxStatusBarPanel.Refresh() as Long
   dim as RECT rcPanel
   StatusBar_GetRect( this.hWindow, this.Index, @rcPanel )
   InvalidateRect(this.hWindow, @rcPanel, CTRUE)
   UpdateWindow(this.hWindow)
   function = 0
end function