Jump to content

Recommended Posts

Posted

Hi,

 

If I correctly understood you, a simple example, try:

 

UniDBGrid1 -> ,,,

function beforeInit(sender, config)
{
  sender.tbar = [{
    text: 'Add Employee',
    //iconCls: 'your icon class',
    handler : function() {
      alert("Add Employee");
      //your logic
    }
  }]
}

Best regards.

  • Upvote 1
  • 2 years later...
Posted

Hello,

I get some question,

1- How can I change disabled true/false of itemid: '_Edit' in runtime (delphi)

2- How can change text font's property / css not change I couldn't find that

3- How can I change heigth of tbar. default is auto, I wanna add more space buttom of button (need for shadow)

Thank you

function beforeInit(sender, config)
{
  sender.tbar = [{
disabled: true, 
itemId:'_Edit',
    text: 'Add Employee',
    //iconCls: 'your icon class',
    handler : function() {
      alert("Add Employee");
      //your logic
    }
  }]
}
Posted

Hello,

 

1- How can I change disabled true/false of itemid: '_Edit' in runtime (delphi)

 

One possible solution, try this:

 

Enable:

UniDBGrid1.JSInterface.JSCode('var item='#1'.query("[itemId=_Edit]")[0]; if (item){item.setDisabled(false)};');

Disable:

UniDBGrid1.JSInterface.JSCode('var item='#1'.query("[itemId=_Edit]")[0]; if (item){item.setDisabled(true)};');
Posted

Hello,

 

2- How can change text font's property / css not change I couldn't find that
 
3- How can I change heigth of tbar. default is auto, I wanna add more space buttom of button (need for shadow)

 

Please, can you explain a little more what you wanted ?!

  • 4 weeks later...
Posted

Hi,

You can see on screenshot. I wanna change button's color to white and make bold, sometime change font name etc.

I wanna change button's parent height. for example. On screenshot. I added empty (button without caption string and "sender.tbar = [ {disabled: true, height:33, width: 1} ,")  then other buttons height can be small. This fake button set toolbar panel's height. Can I set this different way?

Thank you.

post-4508-0-20973500-1519142304_thumb.png

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