THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2012 at 00:47, xxxxxxxx wrote:
+100
i can't get it too.
sample code:
import c4d
from c4d import gui,storage
SPG = 1001
DGR = 1002
BUTTON_1 = 1003
class TestSplGui(gui.GeDialog) :
global spl
def CreateLayout(self) :
global spl
self.AddButton(BUTTON_1, c4d.BFH_LEFT, 150, 15, "Test")
self.LayoutFlushGroup(1002)
self.GroupBegin(DGR, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT)
bc = c4d.BaseContainer()
bc[c4d.SPLINECONTROL_GRID_H] = False
bc[c4d.SPLINECONTROL_GRID_V] = True
bc[c4d.SPLINECONTROL_Y_MIN] = 0
bc[c4d.SPLINECONTROL_Y_MAX] = 50
bc[c4d.SPLINECONTROL_MINSIZE_V] = 10
bc[c4d.SPLINECONTROL_GRIDLINES_V] = 50
spl = self.AddCustomGui(SPG, 1009059, "", c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, 0, 0, bc)
self.GroupEnd()
self.LayoutChanged(1002)
return True
def InitValues(self) :
self.SetTitle("Test")
self.GroupBegin(DGR, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT)
self.GroupEnd()
return True
def Command(self, id, msg) :
global spl
if id==BUTTON_1:
print spl.GetGridLineCountV()
spl.SetGridLineCountV(10)
print spl.GetGridLineCountV()
return True
if __name__=='__main__':
dlg = TestSplGui()
#DLG_TYPE_MODAL = > synchronous dialog
#DLG_TYPE_ASYNC = > asynchronous dialogs
dlg.Open(dlgtype=c4d.DLG_TYPE_ASYNC, defaultw=800, defaulth=600)