This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UIKit import * | |
from ti_system import * | |
from ti_draw import * | |
#Initalize the canvas | |
init() | |
#Create slider | |
slider1 = Slider(100,30,90,30,-100,100,0,True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UIKit import * | |
from ti_system import * | |
from ti_draw import * | |
#Initalize the canvas | |
init() | |
#Create button and ignore the use of the proprietary callback system. This is not suggested though, as it is invoked before any logic takes place. It is only ignored here as an example | |
button1 = Button(100,30,100,20,"Click", None, None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UIKit import * | |
from ti_draw import * | |
from ti_system import * | |
#initalize UIKit | |
UIKit_Init() | |
#Create Elements | |
button1 = Button(20,180,100,20,"change my color!", None, None) | |
colpik = Colorpicker(10,10,Color(0,0,0)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UIKit import * | |
from ti_draw import * | |
from ti_system import * | |
class MyElement(UIElement): | |
def __init__(self, x, y, width, height, examplearg): | |
#all the vars below are from UIElement | |
self.x = x | |
self.y = y | |
self.width = width |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ti_system import * | |
from ti_draw import * | |
from UIKit import * | |
#initalizes the drawing space for canvas | |
init() | |
#Create the Label Element. the label1 varaible still holds refrence to the object in the canvas and can be treated as such | |
label1 = Label(40, 120, "Hello World") | |
#append any elemnts you want to the canvas, in this case, a label |