Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

Button info


I intend to create a list of available resources that can be found by
searching through a known set of directories, each aailable resource
is then presented as a set of checkbuttons.

Is it now possible to hover over each button in turn so that info on
the relevant resource is presented in a text box.  This is so that the
user can determine if theresource is wantedor not.

TIA, Niv

Niv wrote:
> I intend to create a list of available resources that can be found by
> searching through a known set of directories, each aailable resource
> is then presented as a set of checkbuttons.

> Is it now possible to hover over each button in turn so that info on
> the relevant resource is presented in a text box.  This is so that the
> user can determine if theresource is wantedor not.

This sounds like what is referred to as a "tooltip" or "balloon help".
There are a number of extensions that provide this functionality, such
as the "tooltip" package in TkLib - see http://tcllib.sourceforge.net/.
You quite possibly already have tklib installed (e.g., if you have
ActiveTcl). Docs at http://tcllib.sourceforge.net/doc/tooltip.html

-- Neil

At 13 May 2007 05:05:32 -0700 Niv <kev.pars@mbda.co.uk> wrote:

> I intend to create a list of available resources that can be found by
> searching through a known set of directories, each aailable resource
> is then presented as a set of checkbuttons.

> Is it now possible to hover over each button in turn so that info on
> the relevant resource is presented in a text box.  This is so that the
> user can determine if theresource is wantedor not.

Bind to the <Enter> and <Leave> events:

button .b1 -text {Pigs} -command "ProcessResource Pigs"
button .b2 -text {Cows} -command "ProcessResource Cows"
button .b3 -text {Goats} -command "ProcessResource Goats"
button .b4 -text {Chickens} -command "ProcessResource Chickens"

label .help -text {}

pack .b1
pack .b2
pack .b3
pack .b4
pack .help

proc ShowHelp {message} {
  .help configure -text "$message"

}

proc ClearHelp {} {
  .help configure -text {}

}

proc AddHelp {button help} {
  bind $button <Enter> [list ShowHelp "$help"]
  bind $button <Leave> ClearHelp

}

AddHelp .b1 "This is the pig resource"
AddHelp .b2 "This is the cow resource"
AddHelp .b3 "This is the goat resource"
AddHelp .b4 "This is the chicken resource"

> TIA, Niv

--
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
hel@deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk
On 13 May, 14:07, Robert Heller <hel@deepsoft.com> wrote:

Thanks chaps.
I think the tooltip approach may be better as I want the info for each
radio button to be held in a separate file, one file per button, tThe
text(?) file will be part of the resource, giving resource function
etc), and the info to open in a separate, temporay "bubble"
Regards, Niv.
At 13 May 2007 07:47:07 -0700 Niv <kev.pars@mbda.co.uk> wrote:

Note: most (all?) of the tooltip packages implement various sorts of
convenience wrappers around the <Enter> and <Leave> events -- 'under the
hood', the low-level code will look something like my AddHelp proc
above, possibly with additional bells and whistles.

> Regards, Niv.

--
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
hel@deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc