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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...