Hi,
I want to put two buttons namely Up and Down next to a INt32 slider and move the slider up or down based on the button being pressed. Is there a way to do this?
Here's one very crude example.
Stan
(saveFormat "7.0")(date "Thu 15/Feb/2018 10:21:56 ")(veerev "7.0.6310.0")(platform "PC")(execMode v6)(filterNAN 0)(workspaceStackingOrder M.11 M)(SaveCF no)(device 0 ROOTCONTEXT(properties(trigMode deg)(nextID 13)(popupTitleText "Untitled")(popupMoveable 1))(deviceList(device 11 CONTEXT(properties(trigMode deg)(nextID 13)(popupMoveable 1))(interface(output 1(type data)(name "X")(lock constraints)(optional yes)))(deviceList(device 0 SLIDER(properties(name "Int32 Slider")(range 0 100)(detents 1))(interface(input 1(type control)(name "Default Value")(requires(datatype Int32)(shape "Scalar"))(lock name constraints)(optional yes))(output 1(name "Int32")(lock name constraints)))(implementation(value Int32(data 55))(initValue Int32(data 0))))(device 1 CONFIRM25(properties(name "up")(enterButton 0)(escapeButton 0)(isAssigned2FKey None))(interface(output 1(name "Go")(lock name constraints)))(implementation))(device 2 CONFIRM25(properties(name "down")(enterButton 0)(escapeButton 0)(isAssigned2FKey None))(interface(output 1(name "Go")(lock name constraints)))(implementation))(device 3 DECLVAR(properties(scope con)(globalName "global1"))(implementation(value Real64(data 0))))(device 4 FORMULA(properties(expr 1 "global1=global1+1"))(interface(output 1(name "Result")(tag "Result")(lock name constraints)(optional yes))))(device 5 JUNCTION(properties(name "JCT"))(interface(input 1(name "A"))(input 2(name "B"))(output 1(name "Data"))))(device 6 FORMULA(properties(expr 1 "global1=global1-1"))(interface(output 1(name "Result")(tag "Result")(lock name constraints)(optional yes))))(device 7 REPEATUNTILBREAK(interface(output 1(name "Continuous")(lock name constraints))))(device 8 NEXT)(device 9 NEXT)(device 10 FORMULA(properties(expr 1 "global1=50"))(interface(output 1(name "Result")(tag "Result")(lock name constraints)(optional yes))))(device 11 CONFIRM25(properties(name "done")(enterButton 0)(escapeButton 0)(isAssigned2FKey None))(interface(output 1(name "Go")(lock name constraints)))(implementation))(device 12 BREAK)(configuration(connect D11:1 D0:0)(connect D5:1 D0:1)(connect D7:1 D1:0)(connect D7:1 D2:0)(connect D1:1 D4:0)(connect D4:1 D5:1)(connect D6:1 D5:2)(connect D2:1 D6:0)(connect D10:0 D7:0)(connect D4:0 D8:0)(connect D6:0 D9:0)(connect D7:1 D11:0)(connect D0:0 D12:0)(connect D0:1 O1:1))(ShowOnExecPanel(relativeOrigin 870 377)))(contextCarrier(wndOrigin 270 139)(wndState res)(active panel)(panel(extent 196 256)(drawGrid "on")(widget 0 detail(relativeOrigin 70 10)(PID 0)(title off)(tabIndex 0)(borderStyle flat)(extent 104 222)(layout vertical)(fastmode off)(extratics))(widget 1 detail(relativeOrigin 10 10)(PID 1)(title off)(tabIndex 1)(borderStyle none)(extent 47 22))(widget 2 detail(relativeOrigin 10 50)(PID 2)(title off)(tabIndex 2)(borderStyle none)(extent 47 22))(widget 11 detail(relativeOrigin 10 90)(PID 3)(title off)(tabIndex 3)(borderStyle none)(extent 47 22)))(detail(extent 609 534)(anchorPt 1 0)(configuration(devCarrierFor 0(active open)(icon)(open(extent 104 222)(layout vertical)(fastmode off)(extratics))(pinCenter 400 360))(devCarrierFor 1(active open)(icon(extent 18 0))(open(extent 47 22))(title off)(pinCenter 110 330))(devCarrierFor 2(active open)(icon(extent 34 0))(open(extent 47 22))(title off)(pinCenter 110 410))(devCarrierFor 3(active open)(icon)(open(extent 199 115))(pinCenter 440 140))(devCarrierFor 4(active icon)(icon(extent 50 15))(open(extent 145 50))(terminals on)(pinCenter 220 330))(devCarrierFor 5(active icon)(icon(extent 26 25))(open)(terminals on)(pinCenter 300 350))(devCarrierFor 6(active icon)(icon(extent 50 15))(open(extent 145 50))(terminals on)(pinCenter 230 420))(devCarrierFor 7(active icon)(icon(extent 68 51)(iconImage "loop.icn"))(open)(terminals on)(pinCenter 180 250))(devCarrierFor 8(active icon)(icon(extent 28 15))(open)(terminals on)(pinCenter 220 370))(devCarrierFor 9(active icon)(icon(extent 28 15))(open)(terminals on)(pinCenter 220 460))(devCarrierFor 10(active open)(icon)(open(extent 145 50))(terminals on)(pinCenter 170 160))(devCarrierFor 11(active open)(icon(extent 32 0))(open(extent 47 22))(title off)(pinCenter 210 510))(devCarrierFor 12(active icon)(icon(extent 36 15))(open)(terminals on)(pinCenter 410 500))(connect D11:1 D0:0(points 5 236 510 480 510 480 220 400 220 400 228))(connect D5:1 D0:1(points 4 315 350 330 350 330 360 345 360))(connect D7:1 D1:0(points 5 216 250 240 250 240 300 110 300 110 316))(connect D7:1 D2:0(points 7 216 250 240 250 240 300 160 300 160 360 110 360 110 396))(connect D1:1 D4:0(points 5 136 330 170 330 170 310 220 310 220 320))(connect D4:1 D5:1(points 4 247 330 260 330 260 340 284 340))(connect D6:1 D5:2(points 6 257 420 280 420 280 390 260 390 260 360 284 360))(connect D2:1 D6:0(points 5 136 410 160 410 160 400 230 400 230 410))(connect D10:0 D7:0(points 2 180 187 180 222))(connect D4:0 D8:0(points 2 220 340 220 360))(connect D6:0 D9:0(points 4 230 430 230 440 220 440 220 450))(connect D7:1 D11:0(points 9 216 250 240 250 240 300 160 300 160 360 170 360 170 480 210 480 210496))(connect D0:0 D12:0(points 4 400 473 400 480 410 480 410 490))(connect D0:1 O1:1(points 4 454 360 470 360 470 266 607 266)))(stackingOrder 1 2 3 4 5 6 7 8 9 10 11 12 0))))(device 12 TEXTDISPLAY(interface(input 1(name "Data"))))(configuration(connect D0:1 D1:1)))(contextCarrier(wndOrigin 2 2)(wndState res)(active detail)(detail(extent 1367 521)(anchorPt 28 189)(configuration(devCarrierFor 11(active icon)(icon(extent 68 15))(open(extent 196 256)(carbonCopy))(terminals on)(pinCenter 550 80))(devCarrierFor 12(active open)(icon)(open(extent 121 22))(pinCenter 740 100))(connect D0:1 D1:1(points 4 586 80 610 80 610 100 677 100)))(stackingOrder 0 1))(numberFormats(realFormat standard)(realSigDigits 4)(realRadixSpec 4)(integerBase decimal))))
Here's one very crude example.
Stan
(saveFormat "7.0")
(date "Thu 15/Feb/2018 10:21:56 ")
(veerev "7.0.6310.0")
(platform "PC")
(execMode v6)
(filterNAN 0)
(workspaceStackingOrder M.11 M)
(SaveCF no)
(device 0 ROOTCONTEXT
(properties
(trigMode deg)
(nextID 13)
(popupTitleText "Untitled")
(popupMoveable 1))
(deviceList
(device 11 CONTEXT
(properties
(trigMode deg)
(nextID 13)
(popupMoveable 1))
(interface
(output 1
(type data)
(name "X")
(lock constraints)
(optional yes)))
(deviceList
(device 0 SLIDER
(properties
(name "Int32 Slider")
(range 0 100)
(detents 1))
(interface
(input 1
(type control)
(name "Default Value")
(requires
(datatype Int32)
(shape "Scalar"))
(lock name constraints)
(optional yes))
(output 1
(name "Int32")
(lock name constraints)))
(implementation
(value Int32
(data 55))
(initValue Int32
(data 0))))
(device 1 CONFIRM25
(properties
(name "up")
(enterButton 0)
(escapeButton 0)
(isAssigned2FKey None))
(interface
(output 1
(name "Go")
(lock name constraints)))
(implementation))
(device 2 CONFIRM25
(properties
(name "down")
(enterButton 0)
(escapeButton 0)
(isAssigned2FKey None))
(interface
(output 1
(name "Go")
(lock name constraints)))
(implementation))
(device 3 DECLVAR
(properties
(scope con)
(globalName "global1"))
(implementation
(value Real64
(data 0))))
(device 4 FORMULA
(properties
(expr 1 "global1=global1+1"))
(interface
(output 1
(name "Result")
(tag "Result")
(lock name constraints)
(optional yes))))
(device 5 JUNCTION
(properties
(name "JCT"))
(interface
(input 1
(name "A"))
(input 2
(name "B"))
(output 1
(name "Data"))))
(device 6 FORMULA
(properties
(expr 1 "global1=global1-1"))
(interface
(output 1
(name "Result")
(tag "Result")
(lock name constraints)
(optional yes))))
(device 7 REPEATUNTILBREAK
(interface
(output 1
(name "Continuous")
(lock name constraints))))
(device 8 NEXT)
(device 9 NEXT)
(device 10 FORMULA
(properties
(expr 1 "global1=50"))
(interface
(output 1
(name "Result")
(tag "Result")
(lock name constraints)
(optional yes))))
(device 11 CONFIRM25
(properties
(name "done")
(enterButton 0)
(escapeButton 0)
(isAssigned2FKey None))
(interface
(output 1
(name "Go")
(lock name constraints)))
(implementation))
(device 12 BREAK)
(configuration
(connect D11:1 D0:0)
(connect D5:1 D0:1)
(connect D7:1 D1:0)
(connect D7:1 D2:0)
(connect D1:1 D4:0)
(connect D4:1 D5:1)
(connect D6:1 D5:2)
(connect D2:1 D6:0)
(connect D10:0 D7:0)
(connect D4:0 D8:0)
(connect D6:0 D9:0)
(connect D7:1 D11:0)
(connect D0:0 D12:0)
(connect D0:1 O1:1))
(ShowOnExecPanel
(relativeOrigin 870 377)))
(contextCarrier
(wndOrigin 270 139)
(wndState res)
(active panel)
(panel
(extent 196 256)
(drawGrid "on")
(widget 0 detail
(relativeOrigin 70 10)
(PID 0)
(title off)
(tabIndex 0)
(borderStyle flat)
(extent 104 222)
(layout vertical)
(fastmode off)
(extratics))
(widget 1 detail
(relativeOrigin 10 10)
(PID 1)
(title off)
(tabIndex 1)
(borderStyle none)
(extent 47 22))
(widget 2 detail
(relativeOrigin 10 50)
(PID 2)
(title off)
(tabIndex 2)
(borderStyle none)
(extent 47 22))
(widget 11 detail
(relativeOrigin 10 90)
(PID 3)
(title off)
(tabIndex 3)
(borderStyle none)
(extent 47 22)))
(detail
(extent 609 534)
(anchorPt 1 0)
(configuration
(devCarrierFor 0
(active open)
(icon)
(open
(extent 104 222)
(layout vertical)
(fastmode off)
(extratics))
(pinCenter 400 360))
(devCarrierFor 1
(active open)
(icon
(extent 18 0))
(open
(extent 47 22))
(title off)
(pinCenter 110 330))
(devCarrierFor 2
(active open)
(icon
(extent 34 0))
(open
(extent 47 22))
(title off)
(pinCenter 110 410))
(devCarrierFor 3
(active open)
(icon)
(open
(extent 199 115))
(pinCenter 440 140))
(devCarrierFor 4
(active icon)
(icon
(extent 50 15))
(open
(extent 145 50))
(terminals on)
(pinCenter 220 330))
(devCarrierFor 5
(active icon)
(icon
(extent 26 25))
(open)
(terminals on)
(pinCenter 300 350))
(devCarrierFor 6
(active icon)
(icon
(extent 50 15))
(open
(extent 145 50))
(terminals on)
(pinCenter 230 420))
(devCarrierFor 7
(active icon)
(icon
(extent 68 51)
(iconImage "loop.icn"))
(open)
(terminals on)
(pinCenter 180 250))
(devCarrierFor 8
(active icon)
(icon
(extent 28 15))
(open)
(terminals on)
(pinCenter 220 370))
(devCarrierFor 9
(active icon)
(icon
(extent 28 15))
(open)
(terminals on)
(pinCenter 220 460))
(devCarrierFor 10
(active open)
(icon)
(open
(extent 145 50))
(terminals on)
(pinCenter 170 160))
(devCarrierFor 11
(active open)
(icon
(extent 32 0))
(open
(extent 47 22))
(title off)
(pinCenter 210 510))
(devCarrierFor 12
(active icon)
(icon
(extent 36 15))
(open)
(terminals on)
(pinCenter 410 500))
(connect D11:1 D0:0
(points 5 236 510 480 510 480 220 400 220 400 228))
(connect D5:1 D0:1
(points 4 315 350 330 350 330 360 345 360))
(connect D7:1 D1:0
(points 5 216 250 240 250 240 300 110 300 110 316))
(connect D7:1 D2:0
(points 7 216 250 240 250 240 300 160 300 160 360 110 360 110 396))
(connect D1:1 D4:0
(points 5 136 330 170 330 170 310 220 310 220 320))
(connect D4:1 D5:1
(points 4 247 330 260 330 260 340 284 340))
(connect D6:1 D5:2
(points 6 257 420 280 420 280 390 260 390 260 360 284 360))
(connect D2:1 D6:0
(points 5 136 410 160 410 160 400 230 400 230 410))
(connect D10:0 D7:0
(points 2 180 187 180 222))
(connect D4:0 D8:0
(points 2 220 340 220 360))
(connect D6:0 D9:0
(points 4 230 430 230 440 220 440 220 450))
(connect D7:1 D11:0
(points 9 216 250 240 250 240 300 160 300 160 360 170 360 170 480 210 480 210
496))
(connect D0:0 D12:0
(points 4 400 473 400 480 410 480 410 490))
(connect D0:1 O1:1
(points 4 454 360 470 360 470 266 607 266)))
(stackingOrder 1 2 3 4 5 6 7 8 9 10 11 12 0))))
(device 12 TEXTDISPLAY
(interface
(input 1
(name "Data"))))
(configuration
(connect D0:1 D1:1)))
(contextCarrier
(wndOrigin 2 2)
(wndState res)
(active detail)
(detail
(extent 1367 521)
(anchorPt 28 189)
(configuration
(devCarrierFor 11
(active icon)
(icon
(extent 68 15))
(open
(extent 196 256)
(carbonCopy))
(terminals on)
(pinCenter 550 80))
(devCarrierFor 12
(active open)
(icon)
(open
(extent 121 22))
(pinCenter 740 100))
(connect D0:1 D1:1
(points 4 586 80 610 80 610 100 677 100)))
(stackingOrder 0 1))
(numberFormats
(realFormat standard)
(realSigDigits 4)
(realRadixSpec 4)
(integerBase decimal))))