• Welcome to PlanetSquires Forums.
 

Mouse in / out

Started by Petrus Vorster, March 10, 2023, 09:02:07 AM

Previous topic - Next topic

Petrus Vorster

Hi All

I am trying to make a dashboard which is not bloated with lots of controls.
To smooth it out I want to create frames that can be collapsed or expanded when the mouse move over it, then make the relevant controls visible or hide them when the mouse leaves.
Each frame will have e.g. a Textbox and if expanded show a listview and some buttons. Collapsed will only show the textbox.

This may not be the best design idea , but I don't see another way to look sleek and clean.
Making the frame bigger or smaller is easy and hiding / showing controls as well.

The Mouse-in / Mouse-out functions works on the Textbox, but does not seem to work over a frame.

Is this a stupid idea, or anyone have a better idea to do this?

-Peter
-Regards
Peter

SeaVipe

Good idea, Peter. Frame controls don't appear to have the Event handler enabled.
Clive Richey

Paul Squires

Hi Peter,

I'll take a look to see what I can cook up. Give me a day or so but I'll get back to you.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

philbar

I was going to suggest using a label instead of a frame because labels respond better to events, but that sent me down a rabbit hole involving Z-order and transparency. I didn't come back with anything useful.

So, my only suggestion is to substitute a child window in the place where your frame would be. In fact, you can use a frame in the designer to mark the size and location of the child window, which contains your text box and other controls. When the child has been created in the Load event of the main window, you can make the frame invisible. The main window will have to be made aware when the user does something important in the child.

I'm willing to bet that Paul will come back with a solution that's easier and wastes less horsepower.

Phil

Petrus Vorster

Hi All

Dont worry too much about this.
Yes, overlapping controls gives a Z-order issue I am not in the mood for right now.  ;)

The design is not that complicated, like 4 frames of equal size next to each other and not overlapping.
Its just to keep the form clean, as it can look very cluttered quickly and I hate that in some software.
It can look like a Christmas tree very quickly, which does sell for those that cannot see past bells and whistles.

I am one of those weirdos that likes my PC super neat and my table looking like warfare.

-Peter ;D

-Regards
Peter

Paul Squires

Hi folks,

Try the attached sample project. It uses child dialog windows and will expand the frame when the mouse enters the frame area.

Not sure that I am in love with this type of GUI but maybe I would be if I saw a completed application using this approach.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Petrus Vorster

Hi Paul

That is pretty smart going with the child forms.
I will most definitely look into this method.

It strange how one would work on an idea you think would be great and then when finished you are like "Nope, that's not it!".
Lets hope this works for me.

Thank you.

Peter
-Regards
Peter