Jump to content

UniTreeview (background) color (old issue #1016)


mierlp

Recommended Posts

Hi,

 

For now, I think, you can like this:

uses ... UniGUIJSUtils;
procedure TMainForm.UniFormCreate(Sender: TObject);
begin

  // your logical conditions...
  UniSession.SetStyle(
    '#' + UniTreeView1.JSName + '_id .x-tree-view{'+
    '  background-color: ' + uniColor2Web(UniTreeView1.Color) + ';'+
    '}'+
    '#' + UniTreeView1.JSName + '_id .x-tree-view .x-grid-cell-inner-treecolumn{'+
    '  background-color: ' + uniColor2Web(UniTreeView1.Color) + ';'+
    '}'
  );
 
end;

Try..

 

Best regards.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Yes, you are right, I think this will be fixed in the next versions.

 

For now, try:

UniSession.SetStyle(
    '#' + UniTreeView1.JSName + '_id .x-tree-view{'+
    '  background-color: ' + uniColor2Web(UniTreeView1.Color) + ';'+
    '}'+
    '#' + UniTreeView1.JSName + '_id .x-tree-view .x-grid-cell-inner-treecolumn{'+
    '  background-color: ' + uniColor2Web(UniTreeView1.Color) + ';'+
    '  color: ' + uniColor2Web(UniTreeView1.Font.Color) +';'+
    '  font: ' + UniTreeView1.Font.ToString(False, False, False, False) +';'+
    '}'
  );

Best regards.

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  • 3 years later...
  • 2 weeks later...

I said than i used you written as below but it dosent work.

 

UniSession.SetStyle(
    '#' + UniTreeView1.JSName + '_id .x-tree-view{'+
    '  background-color: ' + uniColor2Web(UniTreeView1.Color) + ';'+
    '}'+
    '#' + UniTreeView1.JSName + '_id .x-tree-view .x-grid-cell-inner-treecolumn{'+
    '  background-color: ' + uniColor2Web(UniTreeView1.Color) + ';'+
    '  color: ' + uniColor2Web(UniTreeView1.Font.Color) +';'+
    '  font: ' + UniTreeView1.Font.ToString(False, False, False, False) +';'+
    '}'
  );
Link to comment
Share on other sites

because user maybe select one color in the palette and then want to changed that color and select another one and finally want to finished the selection but not with ok button because that button is far from mouse current location and it is so easy to use dblclick for confirmation selected color.

Link to comment
Share on other sites

23 minutes ago, Kamyar said:

because user maybe select one color in the palette and then want to changed that color and select another one and finally want to finished the selection but not with ok button because that button is far from mouse current location and it is so easy to use dblclick for confirmation selected color.

We have added a new property:

property UseDblClick;

Please wait for the next build.

Link to comment
Share on other sites

  • 1 year later...

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