Jump to content

Recommended Posts

Posted

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
Posted

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.

  • 4 months later...
Posted

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

  • 7 months later...
Posted

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
Posted
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.

Posted

:D Thank you... I write it directly... Next time it will be better a copy&paste...

 

:D

(not to speak of, what all JavaSript identifiers case-sensitive...)

 

Thank you

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...