Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    positioning a button

    For some reason I cannot move my OK button to the right with the following code. I just want it to be centered like the label.


    Code:
    isc.Window.create({
    ID: "cwUserMsgDialog",
    title: "Warning",
    keepInParentRect:true, 
    showHeaderIcon: false,
    canDragResize:false,
    showModalMask:true,
    showMinimizeButton:false,
    width:400, 
    height: 150,
    items:[
    	isc.VStack.create({
    		ID:"cwUserMsgLayout",
    		width:300,
    		align:"center",
    		members:[
    			isc.Label.create({
    				ID:"cwWarningMsgString",
    				wrap: true,
    				align: "center",
    				contents: "TEST", 
    				iconOrientation: "left",
    				icon: "other/help.png" 
    			}),
    			isc.Button.create({
    				ID:"cwWarningOkButton", 
    				left:200,
    				title: "OK",
    				click: function(){cwUserMsgDialog.closeClick();}
    			})
    		]
    	})
    ]})

    #2
    Left/top coordinates on members are ignored when they are Layout members, because the Layout manages these. In this particular use case the built-in Dialog class implements the arrangement you seem to be trying to do by hand.

    Comment

    Working...
    X