• Welcome to PlanetSquires Forums.
 

Ver 3.02 - ListView - Button - StatusBar - UPDATE

Started by SeaVipe, September 28, 2022, 05:30:46 PM

Previous topic - Next topic

SeaVipe

Thanks, Paul!
I'm sure you've answered this before, but is it now possible to have the ListView control's grid set to 'inset', 'raised' etc.? (Or is that part of the Header mods you've already made to the ListView control?) Same for StatusBar panels.

Configurable Row/Cell colours:
Row Click - Currently white Forecolor on Windows Blue BackColor;
Ability to set Row colour when lost focus.

Some error trapping for the ListView control would be good. If a routine is able to exit a BeginUpdate/EndUpdate block without calling EndUpdate, the app will usually crash. (Although this example may be just better programming on my part ;D )

Button control; can the Focus Rectangle be optional? Currently, I force the focus away from the Clicked Button to remove the Rectangle.

UPDATE
Button control; .TextForeColor.Hot  :D
Clive Richey

Paul Squires

Quote from: SeaVipe on September 28, 2022, 05:30:46 PMI'm sure you've answered this before, but is it now possible to have the ListView control's grid set to 'inset', 'raised' etc.? (Or is that part of the Header mods you've already made to the ListView control?) Same for StatusBar panels.
I am adding the ability to display Listview headers using Windows theme so that Listviews will look like every other Listview that you see in regular Windows programs. Currently, I have the Listview header set to use custom draw and although this makes it easier to change colors, fonts, etc... it also makes the header look different than most other Windows program and this can be undesirable. Statusbar panels can not be inset, raised, etc in modern Windows programs when theming is active.

QuoteConfigurable Row/Cell colours:
Row Click - Currently white Forecolor on Windows Blue BackColor;
Ability to set Row colour when lost focus.
I should (hopefully) be able to add this ability to Listviews.

QuoteSome error trapping for the ListView control would be good. If a routine is able to exit a BeginUpdate/EndUpdate block without calling EndUpdate, the app will usually crash. (Although this example may be just better programming on my part ;D )
Yeah, I think this is more of a user programming issue. By the way, you don't need to use BeginUpdate/EndUpdate to add items to a Listview. Those commands are only there to help speed up the bulk adding of hundreds/thousands of items at one time.

QuoteButton control; can the Focus Rectangle be optional? Currently, I force the focus away from the Clicked Button to remove the Rectangle.
I guess this could be do-able. Would need to add another message to Jose's CXpButton class to flag the bIsActive variable in CXpButton.UxDrawPushButton to FALSE in order to prevent the the active drawing. I will log this request and see what can be done.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Thanks, Paul,
With regards to BeginUpdate/EndUpdate, I find that without them the updates to a ListView are very slow even with a low number of rows. However, this effect may be a holdover from previous WinFBE releases. I'll experiment...
Clive Richey

Paul Squires

Quote from: SeaVipe on September 28, 2022, 05:30:46 PMButton control; can the Focus Rectangle be optional? Currently, I force the focus away from the Clicked Button to remove the Rectangle.

UPDATE
Button control; .TextForeColor.Hot  :D


Hi Clive,

I am looking at these two requests now but I am a little confused as to why you would remove the focus indicator from a button? How would the user know when they've TAB'd to the button? Do you color your buttons different colors depending on whether that button has focus?

I am curious to how you have designed your application using no-focus rectangle buttons. Could Labels be used for your use case instead of buttons? Labels can handle click events but are not include in the TAB order so they do not need focus attributes.

I understand the .TextForeColor.Hot request. Labels already have this property but looks like Buttons do not.
 
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Hi Paul,
Yes, my apps use colours to show focus.

Function frmMain_btnStats_MouseEnter( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
    sender.TextForeColor = colors.White
    Function = 0
End Function
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Function frmMain_btnStats_MouseLeave( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
    sender.TextForeColor = colors.SystemWindowText
    Function = 0
End Function

' and

Function frmMain_btnStats_GotFocus( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
    sender.BackColor = sender.BackColorHot
    sender.TextForeColor = colors.White
    Function = 0
End Function
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Function frmMain_btnStats_LostFocus( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
    sender.BackColor = colors.SystemControl
    sender.TextForeColor = colors.SystemWindowText
    Function = 0
End Function

Clive Richey

Paul Squires

Thanks Clive, appreciate the answer. I'll try to coordinate a source code update with Jose for his custom button. Simple as adding a new property that will set a boolean flag that's checked during the drawing routine.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer