Python Tkinter [Line seperator between buttons]Calling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Difference between __str__ and __repr__?How to read a file line-by-line into a list?Does Python have a string 'contains' substring method?

What prevents the use of a multi-segment ILS for non-straight approaches?

Intuition of generalized eigenvector.

Where did Heinlein say "Once you get to Earth orbit, you're halfway to anywhere in the Solar System"?

Should I stop contributing to retirement accounts?

Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed

Is "staff" singular or plural?

Should I outline or discovery write my stories?

Biological Blimps: Propulsion

Writing bit difficult equation in latex

I am looking for the correct translation of love for the phrase "in this sign love"

How can "mimic phobia" be cured or prevented?

Are the IPv6 address space and IPv4 address space completely disjoint?

Which one is correct as adjective “protruding” or “protruded”?

Does a 'pending' US visa application constitute a denial?

Loading commands from file

When a Cleric spontaneously casts a Cure Light Wounds spell, will a Pearl of Power recover the original spell or Cure Light Wounds?

What should you do when eye contact makes your subordinate uncomfortable?

GraphicsGrid with a Label for each Column and Row

Multiplicative persistence

Why is it that I can sometimes guess the next note?

Problem with TransformedDistribution

The IT department bottlenecks progress. How should I handle this?

If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?

Why do we read the Megillah by night and by day?



Python Tkinter [Line seperator between buttons]


Calling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Difference between __str__ and __repr__?How to read a file line-by-line into a list?Does Python have a string 'contains' substring method?













0















so recently i have gotten into Tkinter and been using the docs so far. I ran into this problem where make a visible seperator between my "toolbar buttons", example below:



Home | Insert | PC | Etc..



How could i go about making that seperator, becuase i tried ttk seperator but didnt help me.



Thanks in advance.










share|improve this question

















  • 1





    Please read-up on how to create a Minimal, Complete, and Verifiable example, and post some code to show what you have, so we understand what needs amending.

    – kabanus
    2 days ago
















0















so recently i have gotten into Tkinter and been using the docs so far. I ran into this problem where make a visible seperator between my "toolbar buttons", example below:



Home | Insert | PC | Etc..



How could i go about making that seperator, becuase i tried ttk seperator but didnt help me.



Thanks in advance.










share|improve this question

















  • 1





    Please read-up on how to create a Minimal, Complete, and Verifiable example, and post some code to show what you have, so we understand what needs amending.

    – kabanus
    2 days ago














0












0








0








so recently i have gotten into Tkinter and been using the docs so far. I ran into this problem where make a visible seperator between my "toolbar buttons", example below:



Home | Insert | PC | Etc..



How could i go about making that seperator, becuase i tried ttk seperator but didnt help me.



Thanks in advance.










share|improve this question














so recently i have gotten into Tkinter and been using the docs so far. I ran into this problem where make a visible seperator between my "toolbar buttons", example below:



Home | Insert | PC | Etc..



How could i go about making that seperator, becuase i tried ttk seperator but didnt help me.



Thanks in advance.







python tkinter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









Johnny NiklassonJohnny Niklasson

161




161







  • 1





    Please read-up on how to create a Minimal, Complete, and Verifiable example, and post some code to show what you have, so we understand what needs amending.

    – kabanus
    2 days ago













  • 1





    Please read-up on how to create a Minimal, Complete, and Verifiable example, and post some code to show what you have, so we understand what needs amending.

    – kabanus
    2 days ago








1




1





Please read-up on how to create a Minimal, Complete, and Verifiable example, and post some code to show what you have, so we understand what needs amending.

– kabanus
2 days ago






Please read-up on how to create a Minimal, Complete, and Verifiable example, and post some code to show what you have, so we understand what needs amending.

– kabanus
2 days ago













1 Answer
1






active

oldest

votes


















1














The ttk library has a Separator widget which is specifically designed for this. You can also use a frame with a width of 1 or two pixels.



import tkinter as tk
from tkinter import ttk

root = tk.Tk()
toolbar = tk.Frame(root)
toolbar.pack(side="top", fill="x", padx=20, pady=20)

button1 = tk.Button(toolbar, text="Home")
button2 = tk.Button(toolbar, text="Insert")
sep = ttk.Separator(toolbar)

button1.pack(side="left")
sep.pack(side="left", fill="y", padx=4, pady=4)
button2.pack(side="left")

root.mainloop()


enter image description here






share|improve this answer























  • Thanks man, this is exactly what i was looking for!

    – Johnny Niklasson
    yesterday










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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281326%2fpython-tkinter-line-seperator-between-buttons%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









1














The ttk library has a Separator widget which is specifically designed for this. You can also use a frame with a width of 1 or two pixels.



import tkinter as tk
from tkinter import ttk

root = tk.Tk()
toolbar = tk.Frame(root)
toolbar.pack(side="top", fill="x", padx=20, pady=20)

button1 = tk.Button(toolbar, text="Home")
button2 = tk.Button(toolbar, text="Insert")
sep = ttk.Separator(toolbar)

button1.pack(side="left")
sep.pack(side="left", fill="y", padx=4, pady=4)
button2.pack(side="left")

root.mainloop()


enter image description here






share|improve this answer























  • Thanks man, this is exactly what i was looking for!

    – Johnny Niklasson
    yesterday















1














The ttk library has a Separator widget which is specifically designed for this. You can also use a frame with a width of 1 or two pixels.



import tkinter as tk
from tkinter import ttk

root = tk.Tk()
toolbar = tk.Frame(root)
toolbar.pack(side="top", fill="x", padx=20, pady=20)

button1 = tk.Button(toolbar, text="Home")
button2 = tk.Button(toolbar, text="Insert")
sep = ttk.Separator(toolbar)

button1.pack(side="left")
sep.pack(side="left", fill="y", padx=4, pady=4)
button2.pack(side="left")

root.mainloop()


enter image description here






share|improve this answer























  • Thanks man, this is exactly what i was looking for!

    – Johnny Niklasson
    yesterday













1












1








1







The ttk library has a Separator widget which is specifically designed for this. You can also use a frame with a width of 1 or two pixels.



import tkinter as tk
from tkinter import ttk

root = tk.Tk()
toolbar = tk.Frame(root)
toolbar.pack(side="top", fill="x", padx=20, pady=20)

button1 = tk.Button(toolbar, text="Home")
button2 = tk.Button(toolbar, text="Insert")
sep = ttk.Separator(toolbar)

button1.pack(side="left")
sep.pack(side="left", fill="y", padx=4, pady=4)
button2.pack(side="left")

root.mainloop()


enter image description here






share|improve this answer













The ttk library has a Separator widget which is specifically designed for this. You can also use a frame with a width of 1 or two pixels.



import tkinter as tk
from tkinter import ttk

root = tk.Tk()
toolbar = tk.Frame(root)
toolbar.pack(side="top", fill="x", padx=20, pady=20)

button1 = tk.Button(toolbar, text="Home")
button2 = tk.Button(toolbar, text="Insert")
sep = ttk.Separator(toolbar)

button1.pack(side="left")
sep.pack(side="left", fill="y", padx=4, pady=4)
button2.pack(side="left")

root.mainloop()


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Bryan OakleyBryan Oakley

221k22274434




221k22274434












  • Thanks man, this is exactly what i was looking for!

    – Johnny Niklasson
    yesterday

















  • Thanks man, this is exactly what i was looking for!

    – Johnny Niklasson
    yesterday
















Thanks man, this is exactly what i was looking for!

– Johnny Niklasson
yesterday





Thanks man, this is exactly what i was looking for!

– Johnny Niklasson
yesterday



















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281326%2fpython-tkinter-line-seperator-between-buttons%23new-answer', 'question_page');

);

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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현