• Welcome to PlanetSquires Forums.
 

WinFBE - 2.0.2 - ListView

Started by SeaVipe, December 18, 2019, 08:20:17 PM

Previous topic - Next topic

SeaVipe

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.)
Clive Richey

Paul Squires

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.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

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.
Clive Richey

raymw

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.

SeaVipe

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)
Clive Richey

Paul Squires

Quote from: raymw on January 13, 2020, 03:04: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
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

raymw

Thanks, Paul.  colors.systemhighlight works OK

raymw

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.