why does my icon image not show up on window that i have created












0















while i was making a window, i used .wm_iconbitmap(). it worked but the image showed as blank in the corner of the window. is this because of the size of the file?
there wasn't an error in the code which led me to believe that it was to do with the image it's self.



i have tried resizing the image to as small as possible and tried using different images.



import tkinter
import os
top = tkinter.Tk()
top.title("my_window")
os.chdir("c:\RILEYHQ\my images")
top.wm_iconbitmap('my_icon.ico')
top.mainloop()


this results in a window with a title and an empty sheet of paper image as the icon










share|improve this question























  • Icon image would mean the small icon that appears next to the Title. Is that what you need or are you trying to post an image in the tkinter window?

    – ParvBanks
    Jan 1 at 10:45











  • Tried your code with Pythons pyc.ico without problems. Could it be something to do with your specific icon? Can you post a link to the icon file?

    – figbeam
    Jan 1 at 11:52











  • ParvBanks yes i am trying to make an icon not an image.

    – BOBTHEBUILDER
    Jan 2 at 0:57











  • figbeam the image is on my computer so i don't know how i would send it to you

    – BOBTHEBUILDER
    Jan 2 at 0:59
















0















while i was making a window, i used .wm_iconbitmap(). it worked but the image showed as blank in the corner of the window. is this because of the size of the file?
there wasn't an error in the code which led me to believe that it was to do with the image it's self.



i have tried resizing the image to as small as possible and tried using different images.



import tkinter
import os
top = tkinter.Tk()
top.title("my_window")
os.chdir("c:\RILEYHQ\my images")
top.wm_iconbitmap('my_icon.ico')
top.mainloop()


this results in a window with a title and an empty sheet of paper image as the icon










share|improve this question























  • Icon image would mean the small icon that appears next to the Title. Is that what you need or are you trying to post an image in the tkinter window?

    – ParvBanks
    Jan 1 at 10:45











  • Tried your code with Pythons pyc.ico without problems. Could it be something to do with your specific icon? Can you post a link to the icon file?

    – figbeam
    Jan 1 at 11:52











  • ParvBanks yes i am trying to make an icon not an image.

    – BOBTHEBUILDER
    Jan 2 at 0:57











  • figbeam the image is on my computer so i don't know how i would send it to you

    – BOBTHEBUILDER
    Jan 2 at 0:59














0












0








0








while i was making a window, i used .wm_iconbitmap(). it worked but the image showed as blank in the corner of the window. is this because of the size of the file?
there wasn't an error in the code which led me to believe that it was to do with the image it's self.



i have tried resizing the image to as small as possible and tried using different images.



import tkinter
import os
top = tkinter.Tk()
top.title("my_window")
os.chdir("c:\RILEYHQ\my images")
top.wm_iconbitmap('my_icon.ico')
top.mainloop()


this results in a window with a title and an empty sheet of paper image as the icon










share|improve this question














while i was making a window, i used .wm_iconbitmap(). it worked but the image showed as blank in the corner of the window. is this because of the size of the file?
there wasn't an error in the code which led me to believe that it was to do with the image it's self.



i have tried resizing the image to as small as possible and tried using different images.



import tkinter
import os
top = tkinter.Tk()
top.title("my_window")
os.chdir("c:\RILEYHQ\my images")
top.wm_iconbitmap('my_icon.ico')
top.mainloop()


this results in a window with a title and an empty sheet of paper image as the icon







python user-interface tkinter icons






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 10:24









BOBTHEBUILDERBOBTHEBUILDER

7110




7110













  • Icon image would mean the small icon that appears next to the Title. Is that what you need or are you trying to post an image in the tkinter window?

    – ParvBanks
    Jan 1 at 10:45











  • Tried your code with Pythons pyc.ico without problems. Could it be something to do with your specific icon? Can you post a link to the icon file?

    – figbeam
    Jan 1 at 11:52











  • ParvBanks yes i am trying to make an icon not an image.

    – BOBTHEBUILDER
    Jan 2 at 0:57











  • figbeam the image is on my computer so i don't know how i would send it to you

    – BOBTHEBUILDER
    Jan 2 at 0:59



















  • Icon image would mean the small icon that appears next to the Title. Is that what you need or are you trying to post an image in the tkinter window?

    – ParvBanks
    Jan 1 at 10:45











  • Tried your code with Pythons pyc.ico without problems. Could it be something to do with your specific icon? Can you post a link to the icon file?

    – figbeam
    Jan 1 at 11:52











  • ParvBanks yes i am trying to make an icon not an image.

    – BOBTHEBUILDER
    Jan 2 at 0:57











  • figbeam the image is on my computer so i don't know how i would send it to you

    – BOBTHEBUILDER
    Jan 2 at 0:59

















Icon image would mean the small icon that appears next to the Title. Is that what you need or are you trying to post an image in the tkinter window?

– ParvBanks
Jan 1 at 10:45





Icon image would mean the small icon that appears next to the Title. Is that what you need or are you trying to post an image in the tkinter window?

– ParvBanks
Jan 1 at 10:45













Tried your code with Pythons pyc.ico without problems. Could it be something to do with your specific icon? Can you post a link to the icon file?

– figbeam
Jan 1 at 11:52





Tried your code with Pythons pyc.ico without problems. Could it be something to do with your specific icon? Can you post a link to the icon file?

– figbeam
Jan 1 at 11:52













ParvBanks yes i am trying to make an icon not an image.

– BOBTHEBUILDER
Jan 2 at 0:57





ParvBanks yes i am trying to make an icon not an image.

– BOBTHEBUILDER
Jan 2 at 0:57













figbeam the image is on my computer so i don't know how i would send it to you

– BOBTHEBUILDER
Jan 2 at 0:59





figbeam the image is on my computer so i don't know how i would send it to you

– BOBTHEBUILDER
Jan 2 at 0:59












0






active

oldest

votes











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%2f53994703%2fwhy-does-my-icon-image-not-show-up-on-window-that-i-have-created%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f53994703%2fwhy-does-my-icon-image-not-show-up-on-window-that-i-have-created%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

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith