PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WinFBE - 2.0.2 - ListView  (Read 572 times)

SeaVipe

  • Senior Member
  • ***
  • Posts: 355
  • Windows 10
WinFBE - 2.0.2 - ListView
« on: December 18, 2019, 08:20: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.)
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9203
  • Windows 10
    • PlanetSquires Software
Re: WinFBE - 2.0.2 - ListView
« Reply #1 on: December 19, 2019, 01:35: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.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 355
  • Windows 10
Re: WinFBE - 2.0.2 - General
« Reply #2 on: December 19, 2019, 02:15: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!
Code: [Select]
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.
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

raymw

  • Senior Member
  • ***
  • Posts: 383
Re: WinFBE - 2.0.2 - ListView
« Reply #3 on: January 13, 2020, 03:04: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

Code: [Select]
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.
Logged

SeaVipe

  • Senior Member
  • ***
  • Posts: 355
  • Windows 10
Re: WinFBE - 2.0.2 - ListView
« Reply #4 on: January 13, 2020, 03:15: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)
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9203
  • Windows 10
    • PlanetSquires Software
Re: WinFBE - 2.0.2 - ListView
« Reply #5 on: January 14, 2020, 01:31:33 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
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

raymw

  • Senior Member
  • ***
  • Posts: 383
Re: WinFBE - 2.0.2 - ListView
« Reply #6 on: January 16, 2020, 09:35:00 AM »

Thanks, Paul.  colors.systemhighlight works OK
Logged

raymw

  • Senior Member
  • ***
  • Posts: 383
Re: WinFBE - 2.0.2 - ListView
« Reply #7 on: January 16, 2020, 01:09: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.
Logged