WinFBE Suite 1.9.8 (November 7, 2019)

Started by Paul Squires, November 07, 2019, 09:25:03 PM

Previous topic - Next topic

Paul Squires

Quote from: SeaVipe on November 09, 2019, 07:55:54 PM
1) I was testing an anomaly with the main menu where e.ListViewColumn and e.ListViewRow are popup choices in the Menu's Click event.
2) Any Menu choice will fire frmMain_Deactivate and associated shutdown routines. Then go on to load frmMain again (and associated startup routines) which partially locks up the program (the exit routines will still work with manual intervention but it's not very tidy).

Hi Clive, I am trying to work through your post. I think in this case you may be misinterpreting what "frmMain_Deactivate" represents. That event is fired when the form loses focus, not when it is being closed. So, if your main menu pops up a message box the the focus will shift from the form to the message box...thus firing your Deactivate handler. If you want to handle form closing then you need to put tat code in frmMain_FormClosing or frmMain_FormClosed. This is assuming that I am understanding the problem that you are describing.
Paul Squires
PlanetSquires Software

SeaVipe

Thanks, Paul. I was starting to figure that out but I was focused on the main menu issue and hadn't quite linked the dots.
Clive Richey

raymw

If I select a row with the mouse, it is highlighted blue, if programmatically, it is highlighted grey. Is it possible to be able to select these colours, possibly in designer toolbox properties? Is there a simple ratio between font size and row height in Pixels? If so what is it? Does the grid effect this?

Paul Squires

I just these new Events:

- Added: ListView DoubleClick, RightClick events.
- Added: ListView Click event will now also fire if ENTER is pressed on a ListView line.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: raymw on November 10, 2019, 06:36:56 PM
If I select a row with the mouse, it is highlighted blue, if programmatically, it is highlighted grey.

It shows blue because it has focus. If the control loses focus then you'll get the grey. In code you can do this to set the selected index and also the focus to the control.


   frmMain.ListView1.SelectedIndex = 0
   frmMain.ListView1.Focused = true


Quote
Is there a simple ratio between font size and row height in Pixels? If so what is it? Does the grid effect this?
Windows automatically adjusts ListView row heights based on the font defined for the control. I don't know what magically forumla that is used. To set our own row height would entail having to write the ListView as an OwnerDrawn control and that is outside my scope of development for this ListView control.
Paul Squires
PlanetSquires Software