G4P Mouseover Event, mainly for tooltips

Hi,

I’m wanting to add tool tips to assorted text, labels and possibly buttons. Not apparent in processing and G4P specifically. Main requirement would be for a “mouseover” events generated for these objects. Then imagine the tooltips might start to be a possibility. IE tooltip pops up after x milli-seconds on mouseover event.

Is this a possibility with the G4P library?
or
A work around that isn’t mouseX and mouseY. Plenty of references to that approach. That approach works fine for projects graphical in nature, not so much for a screen full of labels and text boxes.

To put the need in context I’m writing a bit of software that generates batch and script (OS dependent) files for towards a dozen target embedded projects to support Unit testing. There are quite a number of labels, and text boxes that describe installation directories for the toolchains and utilities. In order to make it easier for a new user to get up and running want to be able to intuitively lead the user through the maze of installation dependencies.

Hence the mouseover and tooltip question and why mouseX, mouseY would be a struggle.

Any thoughts?

Many Thanks
Stefan

G4P does not support tooltips because I didn’t think of it when I created G4P. There has never been sufficient interest in having tooltips for me to add it as a feature. In fact you are the first person to ask about tooltips in G4P’s since its launch in March 2009.

It seems to me that the real problem is because the UI is cluttered because you are using lots of controls to guide and get info from the user. I suggest that you look at using the GGroup control - this allows you to group controls by purpose and then control their appearance with a single instruction to the group e.g. fade-out, fade-in, make invisible etc.

G4P comes with a GGroup example. I suggest you play with this to see if you can make use of it in your project.

2 Likes

Hi Peter,
Thanks for the feedback. BTW love your work. Had a play with Groups. Makes sense in some ways but starts to miss the point of what I’m trying to do. Agree what I’ve done is cluttered, but with the tool flow for assorted modes, it does makes sense for the user to get a feel for the overall picture.

Basically user selects the mode from “Select mode” panel on the left, then the column on the right has checkboxes to show which installations are required for that mode. Then the button “Test Installation” checks the status of the assorted tools/toolchains and highlights in green on success, red on failure. Simply run the assorted tools/toolchains with --version or as required to determine status.

Yes it is cluttered, but there is logic to the madness. Peoples can get a quick overview of what works, and what is still needed. They only need to install the binaries for the mode they care about. Gui gets auto populated for new toolchains/tools based on a JSON file. And a separate JSON for all installation directories for all users based on USERDOMAIN. Hence the JSON index spinner request a few weeks back. Wanted to use some construct of tool tips to steer peoples in the right directions. Right mouse click opens a file explorer to select an installation directory. Left mouseclick to directly edit text boxes. Wanted mouseover to give hints as to the URL that might have the relevant binaries.

I’m in the camp with processing that uses processing to get simple GUI stuff working. Not a Java bod, although processing and your library has taught me enough to be dangerous. Possibly not good :slight_smile: Enough that I use IntelliJ and Eclipse for the projects. Your library is so graphically clean and intuitive that it just feels right.

I’m having a crack at adding a tooltips feature for my own purposes to your library. More miss than hit at the moment, but I can see it starting to take shape. This would be less than ideal as would need to update with new source code releases. Understand the interactions are possibly complex and don’t want to foist something on your efforts that have a negative impact.

If I get this going are you happy to vet it for possible inclusion with your library? No offence take if you tell me to go away.

Many Thanks
Stefan

That is a serious challenge. :smile:

In principle I have no issues but in practice this is not so easy because I end up having to maintain the code. In 2010 I was approached by the creators of another (very nice) library wanting to add some ‘cool’ sliders to make their library examples more aesthetically pleasing. I agreed because they would be writing all the code. Unfortunately the slider code did not follow the same event handling pattern used by my other controls, it was slightly buggy and did not work cleanly and I ended up rewriting most of the code myself. Not a complete loss because the new code became the GCustomSlider control :smile:

I have been considering a changing how to G4P manages events but been put off by the amount of work involved. If I decide to go ahead with it I could add tooltips.