Jump to content

Distance between buttons of UnimSegmentedButton


likemike

Recommended Posts

and by the way...

is it possible to change the background color of each button? That would be great!!

I've tried this:

with UniButton1.JSInterface do begin JSCall('btnWrap.setStyle', ['background-image', '"none"']); JSCall('btnWrap.setStyle', ['background-color', 'rgb(0,128,128)']); end;

...but with mobile version UnimButton1 an error (setStyle is undefined) appears.

Link to comment
Share on other sites

Hello! 

First of all I want to thank Sherzod for his good work and fast answers.

But there is something fundamentally wrong here.

I've tried all things I've found in this forum to change the color of a damned UnimButton. None of the tipps and hints worked for me. This cost me 4 hours without result. It's because I'm too stupid? Maybe - but I do programming more than 30 years.
So my question is: where can I get the desired information to help myself (and later for sure others)? I was looking at this page https://docs.sencha.com/extjs/7.0.0/modern/Ext.html but I've found nothing helpful.
Is there any documentation where I can find answers how to set properties for components and all the other JS stuff?

There must be something, because obviously Sherzod knows it all. 

I would be thankful if someone could send me some links or documents....

Regards

Mike


 

Link to comment
Share on other sites

9 hours ago, likemike said:

Due to design reasons, I'd like to put some distance between the buttons of an UnimSegmentedButton.

Is that possible?

Hello,

Try this config:

UnimSegmentedButton -> ClientEvents -> UniEvents ->

function beforeInit(sender, config)
{
    config.defaults = {
        margin: '5px'
    }
}

 

Link to comment
Share on other sites

3 hours ago, Sherzod said:

Hello,

Try this config:

UnimSegmentedButton -> ClientEvents -> UniEvents ->


function beforeInit(sender, config)
{
    config.defaults = {
        margin: '5px'
    }
}

 

This works! But I need the margin only left and right, So I've tried a bit and I've found out, that this could be solved by:
 

function beforeInit(sender, config)
{
   config.defaults = {
        margin: '0px 15px 0px'
   }
}

But other CSS-commands like 

  margin-top: 100px;
  margin-bottom: 100px;
  margin-right: 150px;
  margin-left: 80px;

don't work (error: "Unexpected identifier"). 
So my question is: How can I learn, which commands are allowed? Is there any documentation about that?

Regards

Mike

Link to comment
Share on other sites

×
×
  • Create New...