KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

KF.Net ToolTips

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
e-xennon
KiXforms Dabbler
KiXforms Dabbler


Joined: 08 Aug 2006
Posts: 5

PostPosted: Thu Sep 14, 2006 7:54 am    Post subject: KF.Net ToolTips Reply with quote

Maybe this has been discussed before and I just haven't been able to locate the information. Anyway, although it doesn't make sense it seems that the tooltips work with some controls but not others.

I can get the tooltip to work with a Toolbar item (see example code below):

$Btn1 = $Toolbar1.Buttons.Add($System.ToolBarButton("Btn1"))
$Btn1.ParitalPush = 0 ;False
$Btn1.Pushed = 0 ;False
$Btn1.Style = 1 ;PushButton
$Btn1.Text = "Btn1"
$Btn1.ToolTipText = "Btn1"

But so far I can't get similar code to work for comand buttons, list boxes or text boxes (see example code below):

$Button1 = $System.Button()
$Button1.Left = 270
$Button1.Text = "Save"
$Button1.Top = 240
$Button1.ToolTipText = "Save"
$nul = $Form1.Controls.Add($Button1)

Any advice would be much appreciated.

Thanks.
Back to top
View user's profile Send private message Send e-mail
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Thu Sep 14, 2006 3:20 pm    Post subject: Reply with quote

Hi e-xennon, and welcome to KiXforms.
You are correct the controls, 'Button', 'ListBox' and 'TextBox' do not have a '.ToolTipText' property and unless you can talk Shawn into adding that property to those controls, it will not work.

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
e-xennon
KiXforms Dabbler
KiXforms Dabbler


Joined: 08 Aug 2006
Posts: 5

PostPosted: Thu Sep 14, 2006 11:43 pm    Post subject: Reply with quote

Understood and thanks for the reply.

The main use I'm intrested in is in a ListBox scenario when using the .MouseDown property so it will display a ToolTip to provide brief information about the item clicked on as apposed to using a MessageBox etc. For example when selecting a Virtual Machine Host from a server list to have the ToolTip display a list of the VM Guests on the Host. Or in Citrix when querying the session(s) a user is logged on to have the ToolTip display the session ID and it's state (i.e. Active, Disc, Hung).

If it is something that Shawn has the time and is willing to work on that would be great.

Thanks again.
Back to top
View user's profile Send private message Send e-mail
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Sep 15, 2006 12:05 am    Post subject: Reply with quote

Hey e-xennon sup ?

Tooltips under dotnet work (a little) differently then one might expect. Dotnet has the Tooltip object - which is a single source for tooltips - this gives one the ability to control the look-and-feel of the tooltips across the entire app - plus allows you more control over its features - features include:

Active
Gets or sets a value indicating whether the ToolTip is currently active.

AutomaticDelay
Gets or sets the automatic delay for the ToolTip.

AutoPopDelay
Gets or sets the period of time the ToolTip remains visible if the mouse pointer is stationary within a control with specified ToolTip text.

InitialDelay
Gets or sets the time that passes before the ToolTip appears.

ReshowDelay
Gets or sets the length of time that must transpire before subsequent ToolTip windows appear as the mouse pointer moves from one control to another.

ShowAlways
Gets or sets a value indicating whether a ToolTip window is displayed even when its parent

Anyways - heres some code:

Code:

$System = CreateObject("Kixforms.System")

$Form1 = $System.Form()
$Form1.Width = 380
$Form1.Height = 325

$Tooltip = $System.Tooltip()

$Button1 = $System.Button()
$Button1.Left = 270
$Button1.Text = "Save"
$Button1.Top = 240
$Button1.ToolTipText = "Save"
$nul = $Form1.Controls.Add($Button1)

$Tooltip.SetTooltip($Button1,"Click me to save")

$Form1.Center
$Form1.Show
While $Form1.Visible
 $= Execute($Form1.DoEvents)
Loop

Exit 0


-Shawn
Back to top
View user's profile Send private message
e-xennon
KiXforms Dabbler
KiXforms Dabbler


Joined: 08 Aug 2006
Posts: 5

PostPosted: Fri Sep 15, 2006 12:10 am    Post subject: Reply with quote

It looks great. Thank you both and thanks for the sample code.
Back to top
View user's profile Send private message Send e-mail
masken
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 14 Mar 2003
Posts: 202
Location: Gothenburg, Sweden

PostPosted: Sun Feb 18, 2007 9:01 pm    Post subject: Reply with quote

A couple of questions;

As I've understood it, Tooltip is now set on "system" level.

Why is there 2 references to the tooltip text?

Quote:

$Button1.ToolTipText = "Save"

$Tooltip.SetTooltip($Button1,"Click me to save")


With the code above, if you set $Button1.Enabled = 0, how do you enable tooltip on it ("ShowAlways")?
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group