[MSEide-MSEgui-talk] Tooltip / hint window with auto disappear

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] Tooltip / hint window with auto disappear

Krzysztof
Hi Martin,

I know how to do it by my self but maybe MSEGUI has something build-in
and there is no sense to reinvent the wheel. Even if not, I'll need
your help anyway I guess. I need some kind of mix between hint and
tooltip which I bet you seen many times in web and desktop apps:

1. The first one is very simple. I have window with listview. It has
action in popmenu which copy selected rows into another table in
sqlite. I have assigned "Q" shortcut to it but I want show to user
that this event happened successfully in not annoying and not focus
stealing way. You probably seen it many times in web apps - smooth
small hint with simple message "You copied N rows into clipboard"
which automatically disappear after N seconds or when you click on it.
The call interface should be also simple because I'll use it a lot.
Some kind of:

ShowTooltip("You copied N rows into clipboard", <position>, <hide
delay>, <do fade out>);

The <do fade out> option is questionable, I guess that we may be
limited here with X window / GDI but it would be cool to have this
visual effect

2. This one is extended version of point 1. I want to prepare some
kind of tips for newbie users. For example, user first time open some
window and he get tooltip under button which says "Click here to do
something" with optional check box "Do not show me this message again"
which result I save in my config file

While I'm writting this post, it reminds me Lazarus LCL customizable
component called TPopupNotifier. It has basic template, icon on the
left, title on top, descritpion in the middle and expiration time.

Regards

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Tooltip / hint window with auto disappear

mse
Administrator
On 04/24/2018 04:15 PM, Krzysztof wrote:

>
> 1. The first one is very simple. I have window with listview. It has
> action in popmenu which copy selected rows into another table in
> sqlite. I have assigned "Q" shortcut to it but I want show to user
> that this event happened successfully in not annoying and not focus
> stealing way. You probably seen it many times in web apps - smooth
> small hint with simple message "You copied N rows into clipboard"
> which automatically disappear after N seconds or when you click on it.
> The call interface should be also simple because I'll use it a lot.
> Some kind of:
>
> ShowTooltip("You copied N rows into clipboard", <position>, <hide
> delay>, <do fade out>);
>
Use a tsimpleform with optionswindow = [wo_tooltip]. Use a ttimer, in
ontimer do:
"
procedure ttooltipfo.timerev(const sender: TObject);
begin
 release();
end;
"
in onmouseeevent do:
"
procedure ttooltipfo.mouseev(const sender: twidget;
               var ainfo: mouseeventinfoty);
begin
 if ainfo.eventkind = ek_buttonpress then begin
  release();
 end;
end;
"

> The <do fade out> option is questionable, I guess that we may be
> limited here with X window / GDI but it would be cool to have this
> visual effect
>
It could be done with a tanimtimer and a tanimitemcomp and updating the
window property _NET_WM_WINDOW_OPACITY if the window manager supports it.

> 2. This one is extended version of point 1. I want to prepare some
> kind of tips for newbie users. For example, user first time open some
> window and he get tooltip under button which says "Click here to do
> something" with optional check box "Do not show me this message again"
> which result I save in my config file
>
That can be done with a tstatfile.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Tooltip / hint window with auto disappear

mse
Administrator
On 04/24/2018 07:04 PM, Martin Schreiber wrote:
>
>> The <do fade out> option is questionable, I guess that we may be
>> limited here with X window / GDI but it would be cool to have this
>> visual effect
>>
> It could be done with a tanimtimer and a tanimitemcomp and updating the
> window property _NET_WM_WINDOW_OPACITY if the window manager supports it.
>
git master 81831227126a7cba839e9a932a38fc69d30b00c1 has
tcustommseform.windowopacity, an example is here:
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/animations/windowopacity

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk