'desc' parameter of a Trait

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

'desc' parameter of a Trait

sylvain roy
Hello,

I was wondering if there was a way to remove the word "Specifies"
in the description string of a Trait. For instance, if I define
the button
my_button = Button(label='My_Button', desc='Press this button to display
hello world'),

the string displayed when the cursor is located on this button will be:
Specifies Press this button to display hello world.
Is there a way to remove "Specifies" from this string?

Cheers,
Sylvain
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'desc' parameter of a Trait

Gael Varoquaux
On Wed, May 12, 2010 at 01:03:03AM +0200, Sylvain Roy wrote:
> the string displayed when the cursor is located on this button will be:
> Specifies Press this button to display hello world.
> Is there a way to remove "Specifies" from this string?

I seem to remember that you have to use the keyword argument 'help',
rather than 'desc' for that...

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'desc' parameter of a Trait

sylvain roy
Gael Varoquaux wrote:

> On Wed, May 12, 2010 at 01:03:03AM +0200, Sylvain Roy wrote:
>  
>> the string displayed when the cursor is located on this button will be:
>> Specifies Press this button to display hello world.
>> Is there a way to remove "Specifies" from this string?
>>    
>
> I seem to remember that you have to use the keyword argument 'help',
> rather than 'desc' for that...
>
> Gaël
>  
Thanks for your quick answer. As I can see, a description message will
show up
as soon as the cursor is located on a GUI item (no need to left click on
the mouse). A help message
will only be displayed when the cursor is located on a GUI item and the
mouse is left clicked, which is not
really appropriate for button items. Left clicking on a button wouldn't
anyway display the help message,
it would fire the button. A solution would be to display the button
label beside the button, which I don't want.
Is there another solution by chance?

Cheers,
Sylvain
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'desc' parameter of a Trait

bryce hendrix-2
On 5/12/2010 11:16 AM, Sylvain Roy wrote:

> Gael Varoquaux wrote:
>    
>> On Wed, May 12, 2010 at 01:03:03AM +0200, Sylvain Roy wrote:
>>
>>      
>>> the string displayed when the cursor is located on this button will be:
>>> Specifies Press this button to display hello world.
>>> Is there a way to remove "Specifies" from this string?
>>>
>>>        
>> I seem to remember that you have to use the keyword argument 'help',
>> rather than 'desc' for that...
>>
>> Gaël
>>
>>      
> Thanks for your quick answer. As I can see, a description message will
> show up
> as soon as the cursor is located on a GUI item (no need to left click on
> the mouse). A help message
> will only be displayed when the cursor is located on a GUI item and the
> mouse is left clicked, which is not
> really appropriate for button items. Left clicking on a button wouldn't
> anyway display the help message,
> it would fire the button. A solution would be to display the button
> label beside the button, which I don't want.
> Is there another solution by chance?
>    

tooltip='some text'

I think that will work for you.

Bryce
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev