On 19/07/2017 at 08:15, xxxxxxxx wrote:
Hi,
I'm quite new to python for c4d, so it might be newbie question.
Does anyone know how to organize elements so that they are arragend next to each other instead of top/down?
this is my current class
class MainMenu(gui.GeDialog) :
def CreateLayout(self) :
template_fn = next(os.walk(path))[2]
template_filecnt = len(template_fn)
#print template_fn
#print template_filecnt
bc = c4d.BaseContainer() #Create a new container to store the button image
buttid = 1000 #start id for 1000
i=0 #set iterator
for list in template_fn:
#create buttons
template_path = os.path.normpath(os.path.join(dir,'res/templates/',template_fn[i])) #The path to the image
bc.SetFilename(buttid, template_path) #Add this location info to the conatiner
self.myBitButton=self.AddCustomGui(buttid, c4d.CUSTOMGUI_BITMAPBUTTON, "Bitmap Button", c4d.BFH_CENTER, 30, 30, bc)
self.myBitButton.SetImage(template_path, False) #Add the image to the button
#button id counter, gives every button unique id, i = loop counter for iteration through list
buttid+=1
i+=1
return True
def Command(self, id, msg=None) :
print id
return True