Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Miscellaneous
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
practice problem folder
Miscellaneous
Commits
6f3fd2e9
Commit
6f3fd2e9
authored
1 month ago
by
Duncan Holmes
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
2533d92c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lab on ORM/movies.kv
+115
-0
115 additions, 0 deletions
lab on ORM/movies.kv
with
115 additions
and
0 deletions
lab on ORM/movies.kv
0 → 100644
+
115
−
0
View file @
6f3fd2e9
ScreenManager:
Screen:
name: 'movie_entry'
id: 'movie_entry'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Enter a movie:'
font_size: sp(24)
BoxLayout:
orientation: 'horizontal'
Widget:
Label:
text: 'Movie Title:'
size_hint: (1.0, None)
height: sp(32)
Widget:
TextInput:
id: title
multiline: False
write_tab: False
size_hint: (4.0, None)
height: sp(32)
Widget:
BoxLayout:
orientation: 'horizontal'
Widget:
CheckBox:
id: action
size_hint: (None, None)
size: (sp(32), action_label.height)
Label:
id: action_label
text: 'Action'
size_hint: (None, 1.0)
size: self.texture_size
Widget:
BoxLayout:
orientation: 'horizontal'
Widget:
CheckBox:
id: adventure
size_hint: (None, None)
size: (sp(32), adventure_label.height)
Label:
id: adventure_label
text: 'Adventure'
size_hint: (None, 1.0)
size: self.texture_size
Widget:
BoxLayout:
orientation: 'horizontal'
Widget:
CheckBox:
id: sci_fi
size_hint: (None, None)
size: (sp(32), sci_fi_label.height)
Label:
id: sci_fi_label
text: 'SciFi'
size_hint: (None, 1.0)
size: self.texture_size
Widget:
BoxLayout:
orientation: 'horizontal'
Widget:
Button:
text: 'Create'
size_hint: (4.0, 1.0)
on_press: app.create_movie(title.text, action.active, adventure.active, sci_fi.active)
Button:
text: 'Update'
size_hint: (4.0, 1.0)
on_press: app.update_movie(title.text, action.active, adventure.active, sci_fi.active)
Button:
text: 'Delete'
size_hint: (4.0, 1.0)
on_press: app.delete_movie(title.text)
Widget:
BoxLayout:
orientation: 'horizontal'
Widget:
Label:
id: message
text: ''
size_hint: (None, 1.0)
size: self.texture_size
Widget:
# All screens are white.
<Screen>:
canvas.before:
Color:
rgba: (1.0, 1.0, 1.0, 1.0)
Rectangle:
pos: self.pos
size: self.size
# All labels are blue.
<Label>:
color: (0.0, 0.0, 0.75, 1.0)
# All checkboxes are blue.
<CheckBox>:
canvas:
Color:
rgba: (0.0, 0.0, 0.75, 1.0)
Rectangle:
source: f'atlas://data/images/defaulttheme/checkbox{"_radio" if self.group else ""}{"_disabled" if self.disabled else ""}{"_on" if self.active else "_off"}'
size: sp(32), sp(32)
pos: int(self.center_x - sp(16)), int(self.center_y - sp(16))
# All buttons have white text.
<Button>:
color: (1.0, 1.0, 1.0, 1.0)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment