mierlp Posted December 24, 2015 Share Posted December 24, 2015 Hi, How to set the (background) color of the Treeview. Set the property 'Color' to my color it changes only at designtime but on runtime it's white. ParentColor is False It seems an old issue (#1016) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 25, 2015 Share Posted December 25, 2015 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. Quote Link to comment Share on other sites More sharing options...
skafy Posted January 6, 2016 Share Posted January 6, 2016 How about font color? Why this things don't work in TUniTreeView component? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2016 Share Posted January 6, 2016 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. Quote Link to comment Share on other sites More sharing options...
eduardoA Posted March 22, 2016 Share Posted March 22, 2016 Did not worked with me. And I can't find "UniGUIJSUtils" unit. I just put the color #EDF0F5 instead of using "uniColor2Web" Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 9, 2016 Share Posted April 9, 2016 neither works for me. I'm trying to pyt a background color in a tree view and I can't. I hope this will be solved in the future. Quote Link to comment Share on other sites More sharing options...
Kamyar Posted March 26, 2020 Share Posted March 26, 2020 UniSession.SetStyle(.... does not work Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 26, 2020 Share Posted March 26, 2020 1 hour ago, Kamyar said: UniSession.SetStyle(.... does not work Please explain... Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 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) +';'+ '}' ); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2020 Share Posted April 8, 2020 2 minutes ago, Kamyar said: I said than i used you written as below but it dosent work. On which version you're working? Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 1.90.0.1501 But it is more imporant to me that how i can set dblclick event for TUniColorPalette. can you help me? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted April 8, 2020 Share Posted April 8, 2020 hi, can you try change to '}'+ --> '};'+ or try one by one Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 I dont understand would you please explain clearly. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2020 Share Posted April 8, 2020 21 minutes ago, Kamyar said: 1.90.0.1501 Trial edition? If not, first of all, please adjust your forum email address... Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 and would you please help me in UniColorPalette dblclick event problem. Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 i dont use trial version. License is for ventura.com.tr Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2020 Share Posted April 8, 2020 1 minute ago, Kamyar said: i dont use trial version OK, thank you. So you can adjust your forum email address. Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 dont we have any way to dblclick for UniColorPalette? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2020 Share Posted April 8, 2020 30 minutes ago, Kamyar said: dont we have any way to dblclick for UniColorPalette? I think it's possible. But why do you want to use this event? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 8, 2020 Administrators Share Posted April 8, 2020 56 minutes ago, Kamyar said: i dont use trial version. License is for ventura.com.tr Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 i have a color set form that user set one of the colors from UniColorPalette and i want to do that via dblclick over the colors of colorpalette. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 8, 2020 Administrators Share Posted April 8, 2020 You can try publishing for TUniColorPalette property OnDblClick; Then build uniGUIXX.DPK However, why don't you use OnSelect event? Quote Link to comment Share on other sites More sharing options...
Kamyar Posted April 8, 2020 Share Posted April 8, 2020 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2020 Share Posted April 8, 2020 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. Quote Link to comment Share on other sites More sharing options...
Boghos Posted July 5, 2021 Share Posted July 5, 2021 Has this issue been resolved? I am still not able to set background colour from IDE. I have tried the fixes here in the latest release and i cannot seem to get the JS script to make any difference! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.