How to display kivy panels vertically in a .kv file?
I have my kivy file and my python file. I can display my panels and show their content when they are click but the panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using
orientation: "vertical"
This is not a duplicate question I have checked around and never really found an answer. Here is the code:
<SampBoxLayout>:
orientation: "vertical"
padding: 10
spacing: 10
BoxLayout:
orientation: "vertical"
height: 30
BoxLayout:
orientation: "vertical"
size_hint_x: .25
size_hint_y: .25
TabbedPanel:
do_default_tab: False
size: 5, 5
TabbedPanelItem:
text: "Home"
Label:
text: "Content of Home"
TabbedPanelItem:
text: "Browse"
Label:
text: "Content of Browse"
TabbedPanelItem:
text: "Radio"
Label:
text: "Content of Radio"
TabbedPanelItem:
text: "Made for You"
Label:
text: "Content of Made For You"
TabbedPanelItem:
text: "Recently Played"
Label:
text: "Content of Recently Played"
TabbedPanelItem:
text: "Favorite Songs"
Label:
text: "Content of Recent Songs"
TabbedPanelItem:
text: "Albums"
Label:
text: "Content of Albums"
TabbedPanelItem:
text: "Artists"
Label:
text: "Content of Artists"
TabbedPanelItem:
text: "Stations"
Label:
text: "Content of Stations"
TabbedPanelItem:
text: "Local Files"
Label:
text: "Content of Local Files"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Podcasts"
Label:
text: "Content of Podc
python kivy
|
show 4 more comments
I have my kivy file and my python file. I can display my panels and show their content when they are click but the panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using
orientation: "vertical"
This is not a duplicate question I have checked around and never really found an answer. Here is the code:
<SampBoxLayout>:
orientation: "vertical"
padding: 10
spacing: 10
BoxLayout:
orientation: "vertical"
height: 30
BoxLayout:
orientation: "vertical"
size_hint_x: .25
size_hint_y: .25
TabbedPanel:
do_default_tab: False
size: 5, 5
TabbedPanelItem:
text: "Home"
Label:
text: "Content of Home"
TabbedPanelItem:
text: "Browse"
Label:
text: "Content of Browse"
TabbedPanelItem:
text: "Radio"
Label:
text: "Content of Radio"
TabbedPanelItem:
text: "Made for You"
Label:
text: "Content of Made For You"
TabbedPanelItem:
text: "Recently Played"
Label:
text: "Content of Recently Played"
TabbedPanelItem:
text: "Favorite Songs"
Label:
text: "Content of Recent Songs"
TabbedPanelItem:
text: "Albums"
Label:
text: "Content of Albums"
TabbedPanelItem:
text: "Artists"
Label:
text: "Content of Artists"
TabbedPanelItem:
text: "Stations"
Label:
text: "Content of Stations"
TabbedPanelItem:
text: "Local Files"
Label:
text: "Content of Local Files"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Podcasts"
Label:
text: "Content of Podc
python kivy
Just to clarify, I need the panels items to be listed vertically. Those who know kivy should know what I mean. instead of several TabbedPanels I want the TabbedPanelItems to be going vertically
– Hrittik Chatterjee
Dec 31 '18 at 23:19
1
In this case if the code is necessary and obligatory since you indicate: ... The panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using:` orientation: "vertical"` that is, you have tried something that seems right and it did not work, so without code your question falls on the off-topic: "why isn't this code working?". So in conclusion if you want help provide a Minimal, Complete, and Verifiable example
– eyllanesc
Dec 31 '18 at 23:22
1
Your code may not be necessary for you to ask the question, but it is necessary for us to produce a sensible answer. Please post a MCVE.
– John Anderson
Dec 31 '18 at 23:23
@eyllanesc, thanks for the info!!
– John Anderson
Dec 31 '18 at 23:26
No you dont even need the code to answer the question but here I will edit the question and show the code
– Hrittik Chatterjee
Jan 1 at 0:41
|
show 4 more comments
I have my kivy file and my python file. I can display my panels and show their content when they are click but the panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using
orientation: "vertical"
This is not a duplicate question I have checked around and never really found an answer. Here is the code:
<SampBoxLayout>:
orientation: "vertical"
padding: 10
spacing: 10
BoxLayout:
orientation: "vertical"
height: 30
BoxLayout:
orientation: "vertical"
size_hint_x: .25
size_hint_y: .25
TabbedPanel:
do_default_tab: False
size: 5, 5
TabbedPanelItem:
text: "Home"
Label:
text: "Content of Home"
TabbedPanelItem:
text: "Browse"
Label:
text: "Content of Browse"
TabbedPanelItem:
text: "Radio"
Label:
text: "Content of Radio"
TabbedPanelItem:
text: "Made for You"
Label:
text: "Content of Made For You"
TabbedPanelItem:
text: "Recently Played"
Label:
text: "Content of Recently Played"
TabbedPanelItem:
text: "Favorite Songs"
Label:
text: "Content of Recent Songs"
TabbedPanelItem:
text: "Albums"
Label:
text: "Content of Albums"
TabbedPanelItem:
text: "Artists"
Label:
text: "Content of Artists"
TabbedPanelItem:
text: "Stations"
Label:
text: "Content of Stations"
TabbedPanelItem:
text: "Local Files"
Label:
text: "Content of Local Files"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Podcasts"
Label:
text: "Content of Podc
python kivy
I have my kivy file and my python file. I can display my panels and show their content when they are click but the panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using
orientation: "vertical"
This is not a duplicate question I have checked around and never really found an answer. Here is the code:
<SampBoxLayout>:
orientation: "vertical"
padding: 10
spacing: 10
BoxLayout:
orientation: "vertical"
height: 30
BoxLayout:
orientation: "vertical"
size_hint_x: .25
size_hint_y: .25
TabbedPanel:
do_default_tab: False
size: 5, 5
TabbedPanelItem:
text: "Home"
Label:
text: "Content of Home"
TabbedPanelItem:
text: "Browse"
Label:
text: "Content of Browse"
TabbedPanelItem:
text: "Radio"
Label:
text: "Content of Radio"
TabbedPanelItem:
text: "Made for You"
Label:
text: "Content of Made For You"
TabbedPanelItem:
text: "Recently Played"
Label:
text: "Content of Recently Played"
TabbedPanelItem:
text: "Favorite Songs"
Label:
text: "Content of Recent Songs"
TabbedPanelItem:
text: "Albums"
Label:
text: "Content of Albums"
TabbedPanelItem:
text: "Artists"
Label:
text: "Content of Artists"
TabbedPanelItem:
text: "Stations"
Label:
text: "Content of Stations"
TabbedPanelItem:
text: "Local Files"
Label:
text: "Content of Local Files"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Videos"
Label:
text: "Content of Videos"
TabbedPanelItem:
text: "Podcasts"
Label:
text: "Content of Podc
python kivy
python kivy
edited Jan 1 at 0:41
Hrittik Chatterjee
asked Dec 31 '18 at 23:17
Hrittik ChatterjeeHrittik Chatterjee
11
11
Just to clarify, I need the panels items to be listed vertically. Those who know kivy should know what I mean. instead of several TabbedPanels I want the TabbedPanelItems to be going vertically
– Hrittik Chatterjee
Dec 31 '18 at 23:19
1
In this case if the code is necessary and obligatory since you indicate: ... The panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using:` orientation: "vertical"` that is, you have tried something that seems right and it did not work, so without code your question falls on the off-topic: "why isn't this code working?". So in conclusion if you want help provide a Minimal, Complete, and Verifiable example
– eyllanesc
Dec 31 '18 at 23:22
1
Your code may not be necessary for you to ask the question, but it is necessary for us to produce a sensible answer. Please post a MCVE.
– John Anderson
Dec 31 '18 at 23:23
@eyllanesc, thanks for the info!!
– John Anderson
Dec 31 '18 at 23:26
No you dont even need the code to answer the question but here I will edit the question and show the code
– Hrittik Chatterjee
Jan 1 at 0:41
|
show 4 more comments
Just to clarify, I need the panels items to be listed vertically. Those who know kivy should know what I mean. instead of several TabbedPanels I want the TabbedPanelItems to be going vertically
– Hrittik Chatterjee
Dec 31 '18 at 23:19
1
In this case if the code is necessary and obligatory since you indicate: ... The panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using:` orientation: "vertical"` that is, you have tried something that seems right and it did not work, so without code your question falls on the off-topic: "why isn't this code working?". So in conclusion if you want help provide a Minimal, Complete, and Verifiable example
– eyllanesc
Dec 31 '18 at 23:22
1
Your code may not be necessary for you to ask the question, but it is necessary for us to produce a sensible answer. Please post a MCVE.
– John Anderson
Dec 31 '18 at 23:23
@eyllanesc, thanks for the info!!
– John Anderson
Dec 31 '18 at 23:26
No you dont even need the code to answer the question but here I will edit the question and show the code
– Hrittik Chatterjee
Jan 1 at 0:41
Just to clarify, I need the panels items to be listed vertically. Those who know kivy should know what I mean. instead of several TabbedPanels I want the TabbedPanelItems to be going vertically
– Hrittik Chatterjee
Dec 31 '18 at 23:19
Just to clarify, I need the panels items to be listed vertically. Those who know kivy should know what I mean. instead of several TabbedPanels I want the TabbedPanelItems to be going vertically
– Hrittik Chatterjee
Dec 31 '18 at 23:19
1
1
In this case if the code is necessary and obligatory since you indicate: ... The panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using:` orientation: "vertical"` that is, you have tried something that seems right and it did not work, so without code your question falls on the off-topic: "why isn't this code working?". So in conclusion if you want help provide a Minimal, Complete, and Verifiable example
– eyllanesc
Dec 31 '18 at 23:22
In this case if the code is necessary and obligatory since you indicate: ... The panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using:` orientation: "vertical"` that is, you have tried something that seems right and it did not work, so without code your question falls on the off-topic: "why isn't this code working?". So in conclusion if you want help provide a Minimal, Complete, and Verifiable example
– eyllanesc
Dec 31 '18 at 23:22
1
1
Your code may not be necessary for you to ask the question, but it is necessary for us to produce a sensible answer. Please post a MCVE.
– John Anderson
Dec 31 '18 at 23:23
Your code may not be necessary for you to ask the question, but it is necessary for us to produce a sensible answer. Please post a MCVE.
– John Anderson
Dec 31 '18 at 23:23
@eyllanesc, thanks for the info!!
– John Anderson
Dec 31 '18 at 23:26
@eyllanesc, thanks for the info!!
– John Anderson
Dec 31 '18 at 23:26
No you dont even need the code to answer the question but here I will edit the question and show the code
– Hrittik Chatterjee
Jan 1 at 0:41
No you dont even need the code to answer the question but here I will edit the question and show the code
– Hrittik Chatterjee
Jan 1 at 0:41
|
show 4 more comments
1 Answer
1
active
oldest
votes
If I understand what you want, you need to add the tab_pos
property to your TabbedPanel
, like:
TabbedPanel:
do_default_tab: False
tab_pos: 'left_top'
And unless you are doing something else with them, you don't need all those BoxLayout
items.
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
That is a feature of theTabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column ofToggleButtons
on the left and a single content on the right (maybe anAnchorLayout
). Then program the toggle buttons to switch the content.
– John Anderson
Jan 1 at 3:19
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53992080%2fhow-to-display-kivy-panels-vertically-in-a-kv-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I understand what you want, you need to add the tab_pos
property to your TabbedPanel
, like:
TabbedPanel:
do_default_tab: False
tab_pos: 'left_top'
And unless you are doing something else with them, you don't need all those BoxLayout
items.
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
That is a feature of theTabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column ofToggleButtons
on the left and a single content on the right (maybe anAnchorLayout
). Then program the toggle buttons to switch the content.
– John Anderson
Jan 1 at 3:19
add a comment |
If I understand what you want, you need to add the tab_pos
property to your TabbedPanel
, like:
TabbedPanel:
do_default_tab: False
tab_pos: 'left_top'
And unless you are doing something else with them, you don't need all those BoxLayout
items.
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
That is a feature of theTabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column ofToggleButtons
on the left and a single content on the right (maybe anAnchorLayout
). Then program the toggle buttons to switch the content.
– John Anderson
Jan 1 at 3:19
add a comment |
If I understand what you want, you need to add the tab_pos
property to your TabbedPanel
, like:
TabbedPanel:
do_default_tab: False
tab_pos: 'left_top'
And unless you are doing something else with them, you don't need all those BoxLayout
items.
If I understand what you want, you need to add the tab_pos
property to your TabbedPanel
, like:
TabbedPanel:
do_default_tab: False
tab_pos: 'left_top'
And unless you are doing something else with them, you don't need all those BoxLayout
items.
answered Jan 1 at 2:09
John AndersonJohn Anderson
3,2911515
3,2911515
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
That is a feature of theTabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column ofToggleButtons
on the left and a single content on the right (maybe anAnchorLayout
). Then program the toggle buttons to switch the content.
– John Anderson
Jan 1 at 3:19
add a comment |
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
That is a feature of theTabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column ofToggleButtons
on the left and a single content on the right (maybe anAnchorLayout
). Then program the toggle buttons to switch the content.
– John Anderson
Jan 1 at 3:19
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
This works to do what I asked with one problem. It does not change the text orientation so the text is sideways. How can I fix this?
– Hrittik Chatterjee
Jan 1 at 2:21
That is a feature of the
TabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column of ToggleButtons
on the left and a single content on the right (maybe an AnchorLayout
). Then program the toggle buttons to switch the content.– John Anderson
Jan 1 at 3:19
That is a feature of the
TabbedPanel
. It can probably be customized to look the way you want, but it would be a lot of work. It would likely be easier to just layout a column of ToggleButtons
on the left and a single content on the right (maybe an AnchorLayout
). Then program the toggle buttons to switch the content.– John Anderson
Jan 1 at 3:19
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53992080%2fhow-to-display-kivy-panels-vertically-in-a-kv-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Just to clarify, I need the panels items to be listed vertically. Those who know kivy should know what I mean. instead of several TabbedPanels I want the TabbedPanelItems to be going vertically
– Hrittik Chatterjee
Dec 31 '18 at 23:19
1
In this case if the code is necessary and obligatory since you indicate: ... The panels are oriented horizontally. I want these tabs to be displayed vertically. I have tried using:` orientation: "vertical"` that is, you have tried something that seems right and it did not work, so without code your question falls on the off-topic: "why isn't this code working?". So in conclusion if you want help provide a Minimal, Complete, and Verifiable example
– eyllanesc
Dec 31 '18 at 23:22
1
Your code may not be necessary for you to ask the question, but it is necessary for us to produce a sensible answer. Please post a MCVE.
– John Anderson
Dec 31 '18 at 23:23
@eyllanesc, thanks for the info!!
– John Anderson
Dec 31 '18 at 23:26
No you dont even need the code to answer the question but here I will edit the question and show the code
– Hrittik Chatterjee
Jan 1 at 0:41