Jump to content

Simple TIP: UniEdit with an empty text (feature suggestion)


Recommended Posts

This is a simple tip that allows to display a text within an UniEdit control when it is empty (it would be great if UniEdit could have a property EmpryText to do this):

 

  • Just open UniEdit's ClientEvents and edit ExtEvents property
  • Add the following line in the "OnBeforerender" event:

sender.emptyText='text to display when the field is empty';

  • Upvote 1
Link to comment
Share on other sites

This is a simple tip that allows to display a text within an UniEdit control when it is empty (it would be great if UniEdit could have a property EmpryText to do this):

 

  • Just open UniEdit's ClientEvents and edit ExtEvents property
  • Add the following line in the "OnBeforerender" event:

sender.emptyText='text to display when the field is empty';

 

Would be good to have this as property in Design Time.

Link to comment
Share on other sites

  • 4 months later...

This is a simple tip that allows to display a text within an UniEdit control when it is empty (it would be great if UniEdit could have a property EmpryText to do this):

 

  • Just open UniEdit's ClientEvents and edit ExtEvents property
  • Add the following line in the "OnBeforerender" event:

sender.emptyText='text to display when the field is empty';

 

thank you, very useful

Link to comment
Share on other sites

  • 7 months later...

Hi,

Don't use 

 

function OnBeforerender(sender)
{
    sender.emptyText='
text to display when the field is empty';
}

 

instead, use this UniEvent

 

function OnBeforeInit(Sender)
{
    Ext.Apply(sender, { emptyText: '
text to display when the field is empty' });
}

 

This will avoid in IE bugs like one reported in http://forums.unigui.com/index.php?/topic/3036-problem-with-unicombobox-to-show-selection/

 

Regards,

  • Upvote 1
Link to comment
Share on other sites

instead, use this UniEvent

 

function OnBeforeInit(Sender)

{

    Ext.Apply(sender, { emptyText: 'text to display when the field is empty' });

}

 

Hi estrify.

Thank you.

With all due respect to you.

 

Since I got error, I corrected your code.

 

Sender to sender

Apply to apply

 

function OnBeforeInit(sender)
{
  Ext.apply(sender, { emptyText: 'text to display when the field is empty' });
}

Sincerely.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...