PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: SeaVipe on December 18, 2019, 08:50:17 PM

Title: WinFBE - 2.0.2 - ListView
Post by: SeaVipe on December 18, 2019, 08:50:17 PM
Hi Paul,
-How do I disable ListView OddRowColor? It overrides a programatically set Back Color.
-Is Sort enabled? I can set and get but that's all.

Off topic, Autocomplete only works on controls like forms when WinFBE first starts, after a compile the feature no longer works. (except for a UDT autocomplete which always works.)
Title: Re: WinFBE - 2.0.2 - ListView
Post by: Paul Squires on December 19, 2019, 02:05:54 PM
Thanks Clive, I have now added a True/False property called OddRowColorEnabled. The Sort property used to work before I switched to using an OwnerData approach. Now the sorting needs to be manually added to the class (which I have not done yet). I will remove that property until such time as I have added sort code. Not sure about the autocomplete observation. I will test that see if I can reliably duplicate the problem and then find a cause for it.
Title: Re: WinFBE - 2.0.2 - General
Post by: SeaVipe on December 19, 2019, 02:45:58 PM
Hi Paul, Thanks for the explanation.
-FYI, this morning, after PC start, F6 (which has been reliable) is not finding 'some' Functions.
-I just figured out that for ShowDialog without the parent form handle will show the form modaless, pass the handle to the parent and it shows modal, Yea!

frmJedit.showdialog( frmMainj.hWindow ) '' Pass the parent window handle. Shows the form Modal.
frmJedit.showdialog '' Shows the form Modaless, if the parent is clicked the form gets hidden.
frmJedit.show( frmMainj.hWindow ) '' Pass the parent window handle. Shows the form, if the parent is clicked, the forms stays visible/on top of the parent but loses focus.
frmJedit.show '' Shows the form Modaless, if the parent is clicked the form gets hidden.
Title: Re: WinFBE - 2.0.2 - ListView
Post by: raymw on January 13, 2020, 03:34:24 PM
listview properties - oddrowcolor. (similar to Clive's problem
It appears that odd rows behave differently than even rows. If I programatically highlight an even row, it behaves as expected, but if I highlight an odd row the background does not change, and moving out and coming back into that listview screen, the text stays as highlighted. Although the option of turning off oddrow color may solve the highlighting, but then the oddrow color will not be available.

By highlight I do the following

function highlightline(lnum as long) as Long
   form1.listview1.item(lnum).subitem(0).backcolor=colors.dodgerblue
   form1.listview1.item(lnum).subitem(0).forecolor=colors.white 
   function=1
end function

for even rows, no need to reset the colors on leaving the listview screen, and returning.
btw, how do I use system colors, e.g.system.highlight in the above code (instead of colors.dogerblue, say). it would be nice to be able to set the grid line colours too, independent to the oddrow colors.
Title: Re: WinFBE - 2.0.2 - ListView
Post by: SeaVipe on January 13, 2020, 03:45:49 PM
OddRowColor could be set to allow BackColour to be overridden by a custom colour or turn it off (which is available but is not yet enabled) and do OddRowColor manually.
Yes, grid line colours, size and perhaps even Raised and Inset and Flat. :0)
Title: Re: WinFBE - 2.0.2 - ListView
Post by: Paul Squires on January 14, 2020, 02:01:33 PM
Quote from: raymw on January 13, 2020, 03:34:24 PM
btw, how do I use system colors, e.g.system.highlight in the above code (instead of colors.dogerblue, say). it would be nice to be able to set the grid line colours too, independent to the oddrow colors.

In the visual designer help look at the section "04_Colors".

For highlight color you can use:
color.SystemHighlight        ' background color
color.SystemHighlightText   ' foreground color
Title: Re: WinFBE - 2.0.2 - ListView
Post by: raymw on January 16, 2020, 10:05:00 AM
Thanks, Paul.  colors.systemhighlight works OK
Title: Re: WinFBE - 2.0.2 - ListView
Post by: raymw on January 16, 2020, 01:39:02 PM
It seems that oddrowcolor over-rides any background colour that I try to set for an individual row (but foreground colours can be changed as desired). Wrt grid line colour, they are very faint in some circumstances.