from common import FieldLabel, TitleLabel ownerclass = 'MGTransactionInspector' ownerimport = 'MGTransactionInspector.h' result = Window(485, 352, "") titleLabel = TitleLabel(result, "Transaction Info") tabView = TabView(result) infoTab = tabView.addTab("Info") notesTab = tabView.addTab("Notes") dateLabel = FieldLabel(infoTab.view, "Date") dateField = TextField(infoTab.view, "") descriptionLabel = FieldLabel(infoTab.view, "Description") descriptionField = TextField(infoTab.view, "") payeeLabel = FieldLabel(infoTab.view, "Payee") payeeField = TextField(infoTab.view, "") checknoLabel = FieldLabel(infoTab.view, "Check #") checknoField = TextField(infoTab.view, "") transfersLabel = FieldLabel(infoTab.view, "Transfers") transfersTable = TableView(infoTab.view) transfersTable.OBJC_CLASS = 'MGTableView' mctButton = Button(infoTab.view, "Multi-Currency Balance", action=Action(owner, 'mctBalance')) assignImbalanceButton = Button(infoTab.view, "Assign imbalance", action=Action(owner, 'assignImbalance')) addTransferButton = Button(infoTab.view, "", action=Action(owner, 'addSplit')) removeTransferButton = Button(infoTab.view, "",
from common import FieldLabel, TitleLabel ownerclass = 'MGAccountProperties' ownerimport = 'MGAccountProperties.h' result = Window(300, 255, "") titleLabel = TitleLabel(result, "Account Info") nameLabel = FieldLabel(result, "Name") nameField = TextField(result) typeLabel = FieldLabel(result, "Type") typePopup = Popup(result) currencyLabel = FieldLabel(result, "Currency") currencyCombo = Combobox(result) accountnoLabel = FieldLabel(result, "Account #") accountnoField = TextField(result) inactiveLabel = FieldLabel(result, "Inactive") inactiveField = Checkbox(result, "") notesLabel = FieldLabel(result, "Notes") notesField = TextField(result) cancelButton = Button(result, "Cancel", action=Action(owner, 'cancel:')) saveButton = Button(result, "Save", action=Action(owner, 'save:')) owner.accountNumberTextField = accountnoField owner.currencySelector = currencyCombo owner.nameTextField = nameField owner.inactiveCheckBox = inactiveField owner.notesTextField = notesField owner.typeSelector = typePopup result.delegate = owner result.minSize = Size(result.width, result.height)
from common import FieldLabel, TitleLabel ownerclass = 'MGBudgetPanel' ownerimport = 'MGBudgetPanel.h' result = Window(342, 290, "") titleLabel = TitleLabel(result, "Budget Info") startDateLabel = FieldLabel(result, "Start Date") startDateField = TextField(result, "") repeatLabel = FieldLabel(result, "Repeat") repeatPopup = Popup(result) everyLabel = FieldLabel(result, "Every") everyField = TextField(result, "") everyDescLabel = Label(result, "") stopDateLabel = FieldLabel(result, "Stop Date") stopDateField = TextField(result, "") accountLabel = FieldLabel(result, "Account") accountPopup = Popup(result) targetLabel = FieldLabel(result, "Target") targetPopup = Popup(result) amountLabel = FieldLabel(result, "Amount") amountField = TextField(result, "") notesLabel = FieldLabel(result, "Notes") notesField = TextField(result, "") cancelButton = Button(result, "Cancel", action=Action(owner, 'cancel:')) saveButton = Button(result, "Save", action=Action(owner, 'save:')) owner.accountSelector = accountPopup owner.amountField = amountField owner.notesField = notesField owner.repeatEveryDescLabel = everyDescLabel
from common import FieldLabel ownerclass = 'MGCustomDateRangePanel' ownerimport = 'MGCustomDateRangePanel.h' result = Window(362, 202, "Custom date range") promptLabel = Label(result, "Select start and end dates for your custom range:") startLabel = FieldLabel(result, "Start") startField = TextField(result, "") endLabel = FieldLabel(result, "End") endField = TextField(result, "") slotLabel = Label(result, "Save this custom range in slot:") slotPopup = Popup(result, ["None", NLSTR("#1"), NLSTR("#2"), NLSTR("#3")]) slotNameLabel = Label(result, "Under the name:") slotNameField = TextField(result, "") okButton = Button(result, "OK") cancelButton = Button(result, "Cancel") owner.endDateField = endField owner.slotIndexSelector = slotPopup owner.slotNameField = slotNameField owner.startDateField = startField result.delegate = owner startField.delegate = owner endField.delegate = owner result.canResize = result.canMinimize = False for field in [startField, endField]: field.controlSize = ControlSize.Small slotNameField.controlSize = ControlSize.Small