helpers
Common helpers for building UI tabs.
add_input(parent, label, var, row, on_change)
Add a labeled entry bound to the provided StringVar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
Misc
|
Parent frame hosting the entry row. |
required |
label
|
str
|
Text displayed next to the entry. |
required |
var
|
StringVar
|
StringVar that stores the entry value. |
required |
row
|
int
|
Grid row for the label/entry pair. |
required |
on_change
|
Callable[[], None]
|
Callback invoked when the value changes. |
required |
Source code in src/refi_calculator/gui/builders/helpers.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
add_option(parent, label, var, row, tooltip)
Add a labeled option input with descriptive tooltip.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
Misc
|
Parent frame used for the input row. |
required |
label
|
str
|
Label text describing the option. |
required |
var
|
StringVar
|
StringVar associated with the option entry. |
required |
row
|
int
|
Row index inside the grid layout. |
required |
tooltip
|
str
|
Supplemental explanation shown alongside input. |
required |
Source code in src/refi_calculator/gui/builders/helpers.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
result_block(parent, title, col)
Create a title + value display block within a row.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
Frame
|
Parent frame that hosts the result block. |
required |
title
|
str
|
Title text displayed above the value. |
required |
col
|
int
|
Column index used for layout (unused but maintained for parity). |
required |
Returns:
| Type | Description |
|---|---|
Label
|
The label that shows the numeric value. |
Source code in src/refi_calculator/gui/builders/helpers.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |