Page 1 of 1
Tool Tip
Posted: Tue May 28, 2013 4:40 am
by ChrKlein
Hello,
I have a Problem with the tool tip.
I want to have a line break in the tool tip but
it does not work.
Example :
1. Line 2.Line and so on...
Can you give me a tip?
Re: Tool Tip
Posted: Tue May 28, 2013 2:48 pm
by Scott Klement
I don't think linebreaks are meant to work in a tooltip... maybe there's another widget or property that might work better? can you provide more info on what you need to accomplish?
Re: Tool Tip
Posted: Wed May 29, 2013 7:01 am
by kfritz
Scott,
As I know "title" tooltips aren't capable for line breaks, normally. But the inet has a lot of solutions creating tooltips using CSS, jquery or javascript. Is it possible to integrate such a solution as a custom widget within PUI? So, it would be possible to use multiline tooltips for many purposes, e.g. show a formatted address on a subfile address name or a full item description and many more...
Maybe it could be solved by a window and a hover event also, but the tooltip option would be much easier.
Re: Tool Tip
Posted: Wed May 29, 2013 8:11 am
by ChrKlein
Hello Scott,
At the moment i will try to solve this problem via JQuery.
The HTML-Tag TITLE doesn't work with Linebreak.
Re: Tool Tip
Posted: Thu May 30, 2013 12:24 pm
by Scott Klement
Sorry for the confusion, gentlemen.
I've just learned that you can, in fact, insert line breaks into a tool tip simply by writing RPG code that inserts the EBCDIC newline character, x'25', into the field that's bound to the tool tip.
In the following example, the field named 'tip' is bound to the tooltip property of a button on the screen:
Code: Select all
H DFTACTGRP(*NO)
FSPLITTIPD CF E WORKSTN EXTDESC('SKTEST/SPLITTIPD')
F EXTFILE(*EXTDESC)
F HANDLER('PROFOUNDUI(HANDLER)')
/free
tip = '123 Sesame St' + x'25'
+ 'New York, NY' + x'25'
+ 'USA';
exfmt rec;
*inlr = *on;
Here's what it looks like when I hover over the button:
- splittip.png (3.74 KiB) Viewed 1345 times
So, apparently, I was mistaken earlier. Line breaks in tool tips do work.
Having said that, I personally do not like to use anything that requires "hover" in my applications. Touch screens are becoming very popular in computing. Obviously, mobile devices use touch screens, plus Windows 8 is trying to make them popular in the desktop market as well. Since anything based on a "hover" does not work on a touch screen, I try to avoid hover-based stuff.
But, it does look like it works,
Re: Tool Tip
Posted: Fri May 31, 2013 5:06 am
by kfritz
Great Scott,
What the hell, I don't know what i've done - tried to reproduce a solution like yours yesterday, but it wouldn't run. Maybe, that i indicated a string as a constant for testing. Anyway, thanks for your work. I agree in principle to avoid hovering, if mobile devices are involved. But I think designing mobile applications are a different thing and should be well considered. For desktop screens (which are the majority of) can a tooltip place some helpful information.
Just my thoughts.
Karl
Re: Tool Tip
Posted: Fri May 31, 2013 12:48 pm
by Scott Klement
kfritz wrote:What the hell, I don't know what i've done - tried to reproduce a solution like yours yesterday, but it wouldn't run. Maybe, that i indicated a string as a constant for testing.
I believe that the string has to be a "bound" variable from an RPG program. Are you still having trouble making it work, Karl?
kfritz wrote:Anyway, thanks for your work. I agree in principle to avoid hovering, if mobile devices are involved. But I think designing mobile applications are a different thing and should be well considered. For desktop screens (which are the majority of) can a tooltip place some helpful information.
My thinking here is that Microsoft is trying very hard to make touch screens viable for the desktop/laptop market. That's one of the big things they introduced with Windows 8. Now, maybe Windows 8 will never become popular (much like Vista) and therefore touch devices won't, either? But, if they do, I sure wouldn't want to have to re-create all of my display files to avoid hover...
Re: Tool Tip
Posted: Fri May 31, 2013 1:35 pm
by kfritz
Scott,
The bound field did the trick. Constants with line feeds wouldn't run. So, it's all ok.
W8, smile ...
Let's see, what happens. But good to know thats there an issue that could become more importance. ;-)
Have a nice weekend,
Karl