Menu

Images Again

Anonymous
2020-07-03
2020-07-03
  • Anonymous

    Anonymous - 2020-07-03

    Hi
    Sorry to bother you but I have been struggling with adding images to buttons.

    I am using Windows 10 on a Ryzen 7 laptop with 20GB Ram, a 512GB SSD (C:)and a 2TB internal hdd (D:)

    I have 3 image files in a sub-folder of the one that that contains the project .tcl file
    The first 2 images I copied form page's images folder (file.gif and folder.gif) the 3rd is a small gif (30 * 30 pixels) created from a screenshot of a button in another app (I called it Save.gif)

    I can get the first two to work and can see file_gif and folder_gif in the button image image attributes.When I select the third one third one appears to insert an empty image called image20, no image shows in the button and the text disappears, so it does something!

    One strange thing I have seen is that the tcl file is referencing the wrong directory, as I see this:
    set image_list { \
    file_gif "../page/images/file.gif" \
    folder_gif "../page/images/folder.gif" \
    image20 "../page/Save.gif" \
    }

    My project file is in D:\Marking Tool and the images are in D:\Marking Tool\images so the generator seems to have navigated to page's image folder installation folder D:\page\images and found the two images there?

    I have tried to get this to work with Page 5.03 and 5.3 installed to C:\page, and then to D:\page.
    With the project in a folder off C:\ and then D:. I have also tried many other combinations sometimes getting "the couldn't open ".": ..." message that Eric Mathieu saw.

    Sorry this is such a long post but I wanted to include as much detail as I could, and thatnks for looking at it too.
    Andrew

     
  • Anonymous

    Anonymous - 2020-07-03

    Hi
    I tried this, if I close the gui file, correct the paths manually (in notepad++) and replace the image20 references with save_gif like this:

    set image_list { \
    file_gif "./images/file.gif" \
    folder_gif "./images/folder.gif" \
    save_gif "./images/Save.gif" \
    }

    then reopen it everything seems to work, all the buttons show correctly, I can add a new button put an image in it which doesn't work, I get image21 in the attribute, but if I save, close, correct the path (the other paths stay correct) it does work.

    So at least I have a workaround and can carry on with what I was doing, but I do hope this can be fixed.
    Andrew

     
  • Greg Walters

    Greg Walters - 2020-07-03

    Please try this...
    Open a windows command prompt and in it change directory to your D:\Marking Tool\i folder.
    Then start Page by calling the startup batch file from that terminal.
    Add a few buttons, set the images that are in that images folder. Save the project and see if it works.

    Greg

     
  • Anonymous

    Anonymous - 2020-07-03

    Hello Greg
    Wow that was a quick response, thank you very much :)

    Yes that has fixed it :D

    I'll add a batch file to the project to start Page from the project folder. Another good effect of this is that I dont have to go find the project files anymore, there are there when I click open project :) :D

    I wish I had know about that at 8am this morning, but I certainly got to know my way around the page installation :D

    I am so pleased that I know what the problem is now because I like this tool, it is just what I need to create the boiler plate for the tkinter library.

    Thanks very much again from Andrew in wales
    Diolch yn fawr iawn (Welsh for thanks very much).
    Hwyl

     
  • Andrew Mascord

    Andrew Mascord - 2020-07-03

    Great tutorial by the way Greg I worked through it over the last few days :) Diolch yn fawr iawn

     
  • Greg Walters

    Greg Walters - 2020-07-03

    Glad to hear it worked. Be sure to start Page from the project folder every time. It will keep you from having many problems.

    Thank you for the kind words on the tutorial.

    Greg

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.