PlanetSquires Forums

Support Forums => WinFBE - Code Editor and Visual Designer => Topic started by: Petrus Vorster on March 10, 2023, 09:02:07 AM

Title: Mouse in / out
Post by: Petrus Vorster on March 10, 2023, 09:02:07 AM
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
Title: Re: Mouse in / out
Post by: SeaVipe on March 10, 2023, 02:26:06 PM
Good idea, Peter. Frame controls don't appear to have the Event handler enabled.
Title: Re: Mouse in / out
Post by: Paul Squires on March 10, 2023, 03:54:58 PM
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.
Title: Re: Mouse in / out
Post by: philbar on March 10, 2023, 05:33:20 PM
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
Title: Re: Mouse in / out
Post by: Petrus Vorster on March 11, 2023, 09:24:21 AM
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

Title: Re: Mouse in / out
Post by: Paul Squires on March 11, 2023, 01:41:56 PM
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.
Title: Re: Mouse in / out
Post by: Petrus Vorster on March 11, 2023, 01:51:28 PM
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