I want to create grid layout, and show my pictures in the layout,like content browser layout.
I try to use GeUserArea() ,but it's little hard for me.
Can you guys give some idea or example for me?
(I'm chinese guy , so... sorry about my bad english )
Hi, @gheyret I restored this topic since I have the answers ready and it may interest other people.
There is nothing builtin like that in Cinema 4D the only way is to recreate everything yourself in a GeUserArea.
With that's said there is this topic that may interest you Drag & Drop to Reorder in GUI.
There is also this example PoseMasterUi_Exemple.py I did some time ago.
Hope its helpful,
Wow! Big thanks for you man !
Hi @m_adam thank you again ,I have another problem is ; if i try to create ScrollArea in UserArea ,the cinema 4d is crashed,i don't know what's wrong
ScrollArea doesn't create a scroll bar but scrolls the user area.
So please open a new topic with your code included so I can take a look :).
This is my code:
def DrawMsg(self, x1, y1, x2, y2, msg):
This method is called to render the content of the view.
# Enables double buffering to avoid flickering.
# Draw the background.
self.DrawRectangle(x1, y1, x2, y2)
self.ScrollArea(1, 1, x1, y1, self.GetWidth(), self.GetHeight())
I really encourage you to open a new topic, the issue here is unrelated and due to ScrollArea actually invalidate the whole drawing, and since you are in the DrwMsg, this creates an infinite loop where C4D try to redraw (calling DrawMsg) but you scroll so it invoke a redraw and etc.