Jump to content


Photo

Hint " Ext.tip.ToolTip "


  • Please log in to reply
11 replies to this topic

#1 shawdown

shawdown

    Member

  • uniGUI Subscriber
  • PipPip
  • 47 posts

Posted 28 December 2017 - 03:45 PM

I'm adding a hint to a TUniImage with the code below.
function afterrender(sender, eOpts)
{
    sender.tip = Ext.create('Ext.tip.ToolTip', {
        target: sender.el,
        html: '<span class="hintClass">MyHint</span>'
    });
 
But at some point I need to change the hint at runtime.
Any idea how I can do it?

 


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4560 posts

Posted 28 December 2017 - 03:57 PM

Hi,

 

You can try, like this for example:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniImage1.JSInterface.JSCall('tip.update', ['New hint']);
end;

Best regards,


  • 0

#3 shawdown

shawdown

    Member

  • uniGUI Subscriber
  • PipPip
  • 47 posts

Posted 28 December 2017 - 04:45 PM

Perfect.
Thank you so much.

  • 0

#4 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 295 posts

Posted 29 December 2017 - 08:54 AM

Hello,

How can I use this tooltip css example for TuniLabel etc.?

 

1- https://codepen.io/mejiaj/pen/ZGJjvE

2- https://codepen.io/s...tran/pen/KaYYBz

 

thank you.


  • 0

#5 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4560 posts

Posted 29 December 2017 - 09:50 AM

Hi,

 

Can you try to use this extension too?!:

http://forums.unigui...lout-extension/

 

Best regards,


  • 0

#6 shawdown

shawdown

    Member

  • uniGUI Subscriber
  • PipPip
  • 47 posts

Posted 29 December 2017 - 01:40 PM

Hi,

 

Can you try to use this extension too?!:

http://forums.unigui...lout-extension/

 

Best regards,

 

Hello "Delphi Developer" for this extension I created this unit.
Maybe it's useful to someone.
 
    with TuniCallOut.Create do
    Begin
      Theme := cssYellow;
      Width := 600;
      Text := 'mensagem teste';
      Target := UniButton2;
      Show;
    End;

Attached Files


  • 0

#7 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 295 posts

Posted 30 December 2017 - 08:16 AM

Hello,

@Delphi Developer, Thank your suggestion, but its need to triggered code, I mean, your suggestion work "like" showmessage(). I wanna "HINT". Default unigui has it, but I wanna use html text in hint. fast and easy way use css on this.

Can see in previous message, two link has example has. When mouse over text, hint or tooltip popup. I wanna apply this css in my project. How can I do this?

 

@showdown, thank you for shared code. I need popup this message or callout message onHint. unigui has not onhint event, so I'm looking for solution.

If I were yoou, I'm not create class for each use. Your class's job just build string for " UniSession.AddJS(". This can make in function(_Target : TUniControl;_Theme : TcoThemeCSS=cssDefault;.....): string. ofcourse this is my way

 

Thank you, regards


  • 0

#8 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4560 posts

Posted 03 January 2018 - 06:31 PM

Hi,

 

@Delphi Developer, Thank your suggestion, but its need to triggered code, I mean, your suggestion work "like" showmessage(). I wanna "HINT". Default unigui has it, but I wanna use html text in hint. fast and easy way use css on this.

Can see in previous message, two link has example has. When mouse over text, hint or tooltip popup. I wanna apply this css in my project. How can I do this?

 

You can try this, for example:

 

1. CustomCSS:

Spoiler

 

2. UniLabel -> TextConversion = txtHTML

 

3. UniLabel -> Caption = <div id="anim"><span class="tooltip" data-tooltip="username must consist of 29 symbols.">?</span></div>

 

Best regards,

 


  • 0

#9 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 295 posts

Posted 05 January 2018 - 06:26 AM

Thank you very much

Another perfect solution :)

Best regards


  • 0

#10 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 295 posts

Posted 12 January 2018 - 09:30 AM

Hello,

How can I remove transparent background? I couldn't find how to do.

regards

Attached Files


  • 0

#11 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4560 posts

Posted 12 January 2018 - 04:10 PM

Hi,

 

Hello,

How can I remove transparent background? I couldn't find how to do.

regards

 

Try this, for example:

 

For you label -> ClientEvents -> ExtEvents -> function afterrender:

function afterrender(sender, eOpts)
{
    sender.el.setStyle('z-index', 100);
}

Best regards,


  • 0

#12 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 295 posts

Posted 13 January 2018 - 07:02 AM

Thank you very much


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users