Removing color picker from ColorField
-
Hello!
I'm creating simple GeDialog and I'm wondering is it possible to remove color picker that is now default in ColorField in C4D R20?
For my use what I'm trying to achieve there is no need for color picker and it is taking too much space from my dialog.
Script:
import c4d from c4d.gui import GeDialog class Dialog(GeDialog): def __init__(self): super(Dialog, self).__init__() def CreateLayout(self): self.SetTitle("Dialog") self.GroupBegin(1000, c4d.BFH_LEFT, 0, 0) self.AddColorField(1001, c4d.BFH_CENTER) self.GroupEnd() return True dlg = Dialog() dlg.Open(c4d.DLG_TYPE_ASYNC, 0, -2, -2)
-
Hello,
unfortunately it is currently not possible to hide the color picker icon in R20.
best wishes,
Sebastian -
I am with the OP.
Can we please have an option in future updates where this color picker can be hidden (Python and C++ SDK please).
Thanks -
I am resurrecting this post again. Is it possible yet to hide the color picker?
Also I want to disable the expander arrow on the left that lets users expand to view other settings. All I want to show is a color on screen, when they click it then it should show the Color Picker dialog.
Anything in R21 upwards?
I may have to implement my own custom gui widget to simply draw a small square box it seems.
-
Hi Unfortunately this is still the same status, I will try to see what we can do in the future.
Nevertheless, in case, we would implement a new flag, this will not be propagated to previous versions.Cheers,
Maxime. -
Thanks Maxime. I may write a custom gui, which would effectively be just a square for the color. Is there a way to bring up a colorchooser dialog? I can't seem to see one, but perhaps you know of an internal command we could call that would allow us to display the dialog and get the resulting color picked?
Thanks,
Kent -
Hi @kbar you can open a ColorCooser dialog with c4d.gui.ColorDialog in python and GeChooseColor or GeChooseColorAlpha in C++.
Cheers,
Maxime. -
And sorry @kbar, @C4DS, @aturtur I should have found it earlier, but after looking at how to implement it, I figured out it's already possible since R21 with the flag
DR_COLORFIELD_NO_SCREENPICKER
import c4d class MyDialog (c4d.gui.GeDialog): def CreateLayout(self): self.AddColorField(1000, c4d.BFH_LEFT | c4d.BFV_TOP, colorflags=c4d.DR_COLORFIELD_NO_SCREENPICKER) return True if __name__=='__main__': global dialog dialog = MyDialog() dialog.Open(c4d.DLG_TYPE_ASYNC, xpos=-2, ypos=-2)
Cheers,
Maxime. -
This post is deleted!