Add Property StatusBarText

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Add Property StatusBarText

Postby jasantana » Thu Aug 12, 2010 10:40 am

Good morning from Gran Canaria.

Maybe this can be done somehow I do not know, but I would like to show a text in the StatusBar when an element gets the focus. Maybe a property for the elements, for example StatusBarText, could do it.

When the element gets the focus and that property is not empty it could be shown.

Thanks in advance.
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Add Property StatusBarText

Postby jcompagner » Thu Aug 12, 2010 10:44 am

does application.setStatusText() not work for you?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Add Property StatusBarText

Postby ROCLASI » Thu Aug 12, 2010 10:46 am

You can use the onFocusGained event on the elements to trigger a method that sets the statustext (application.setStatusText() ).
And of course the onFocusLost event to clear it again.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Add Property StatusBarText

Postby jasantana » Fri Aug 13, 2010 11:29 am

That way works but I think that is faster if Servoy could do that automatically. :lol: Think about a form with 50 elements.

Could be like the ToolTip. Servoy traps OnMouseOver and OnMouseLeave to show the ToolTip, the same way Servoy could trap onFocusGained and onFocusLost, check if statusBarText property is empty or not and act.

Don´t you think it´s easier for Rapid Development?

Thanks.
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Add Property StatusBarText

Postby jcompagner » Fri Aug 13, 2010 11:33 am

you still only have to do that once, just make a (base) form and attach your method to onElementFocusGained
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Add Property StatusBarText

Postby jasantana » Fri Aug 13, 2010 1:05 pm

Hi Johan.

Please be patient with me I´m a newbie.

I understand what you mean with placing code in OnElementFocusGained, but where can I store the string to show in the status bar for each element?

What I do not understand is "create a base form", what is a base form? Do you mean a form that I can subclass? If so how can I do that?

Thanks in advance.
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Add Property StatusBarText

Postby Joas » Fri Aug 13, 2010 2:02 pm

jasantana wrote:where can I store the string to show in the status bar for each element?
A database would be a good place to store that, create a table that stores the form name, element name and status text.

jasantana wrote:What I do not understand is "create a base form", what is a base form? Do you mean a form that I can subclass? If so how can I do that?

A form can inherit stuff from another form. In order to do that you have to set the extendsForm property to that "base form".
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: Add Property StatusBarText

Postby Jeroen de Vries » Mon Aug 16, 2010 8:34 am

To build generic stuff like this, it would be nice if we could add custom properties and methods to UI objects.
Jeroen de Vries
Softwear BV
www.softwear.nl
Jeroen de Vries
 
Posts: 61
Joined: Sun Mar 02, 2008 12:18 pm

Re: Add Property StatusBarText

Postby jcompagner » Mon Aug 16, 2010 10:22 am

properties i could see some use cases. (to give the elements some extra (configuration) properties that you can ask for)
But what would methods really do?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Add Property StatusBarText

Postby Jeroen de Vries » Mon Aug 16, 2010 10:56 am

Sorry for my sparse info.

With methods I really meant access and assign methods.
The access method should fire when a property value is accessed, the assign method should fire when a property is assigned a new value.

With such methods you could simply implement custom validation, that´s their primary use.
Jeroen de Vries
Softwear BV
www.softwear.nl
Jeroen de Vries
 
Posts: 61
Joined: Sun Mar 02, 2008 12:18 pm

Re: Add Property StatusBarText

Postby jcompagner » Mon Aug 16, 2010 11:18 am

assign we have, thats ondatachange.

access we also kind of have, thats custom converters.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Add Property StatusBarText

Postby Jeroen de Vries » Mon Aug 16, 2010 11:24 am

What I meant is a method that fires when the value of a custom property changes. So it is like onDataChange per property, you need to be able to add a pair of methods per custom property.

Example: If I would add myProprty to an object I would expect myProperty_Assign and myProperty_Access methods to be added automatically.
Jeroen de Vries
Softwear BV
www.softwear.nl
Jeroen de Vries
 
Posts: 61
Joined: Sun Mar 02, 2008 12:18 pm

Re: Add Property StatusBarText

Postby jasantana » Mon Aug 16, 2010 11:48 am

Add custom methods to elements is also a good idea if we could subclass elements. With Visual FoxPro you can subclass a base element (for example a textbox) this way you can create an element with code that can be used many times in your app without having to rewrite the code, much more if you need to make a change you can simply modify the class code that will be propagated.
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests