Menu

Unable to change font on buttons.

Anonymous
2024-03-14
2024-03-15
1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2024-03-14

    Hello,

    I am facing a strange issue while trying to change fonts rendered on the buttons using the Attribute configuration window.

    I have added a simple button to the GUI Top frame, and while trying to change the font on the button.
    Receiving the following log output on the Linux Terminal.

    dpr: ::SelectFont::create: bg = #d9d9d9, fg = #000000,
    

    But I do not observe any font manager GUI pop-up window being rendered.
    When trying to launch the font configuration option from the Attribute Window a second time, observing the following error:

    window name "fontmgr" already exists in parent
        while executing
    "toplevel $path -relief $re -borderwidth $bd -class $dialogClass"
        (procedure "Dialog::create" line 22)
        invoked from within
    "Dialog::create $path -modal local -anchor e -default 0 -cancel 1  -background $bg  -title  [Widget::getoption "$path#SelectFont" -title]  -parent [Wid..."
        (procedure "::SelectFont::create" line 19)
        invoked from within
    "SelectFont .vTcl.fontmgr -font $font_desc  -background $vTcl(actual_bg)"
        (procedure "vTcl:font:prompt_user_font_2" line 10)
        invoked from within
    "vTcl:font:prompt_user_font_2 $font_desc"
        (procedure "vTcl:font:prompt_user_font" line 12)
        invoked from within
    "vTcl:font:prompt_user_font $vTcl(w,widget) -font"
        invoked from within
    ".vTcl.ae.sw.c.f2.f._Button.t-font.f invoke"
        ("uplevel" body line 1)
        invoked from within
    "uplevel #0 [list $w invoke]"
        (procedure "tk::ButtonUp" line 22)
        invoked from within
    "tk::ButtonUp .vTcl.ae.sw.c.f2.f._Button.t-font.f"
        (command bound to event)
    

    Not really sure what to make of this error message.

    This issue causes the whole PAGE Application to freeze and unable to quit. Had to kill the application from another terminal.

     
  • Greg Walters

    Greg Walters - 2024-03-14

    Hi.
    Could you tell me what version of Linux you are using (Ubuntu, Fedora, etc.)
    What version of PAGE are you using?

    Could you provide a copy of the project .tcl file?

    Thank you in advance,
    Greg

     
  • Anonymous

    Anonymous - 2024-03-14

    It's Fedora 39.
    Python 3.12.2
    Page 8.0
    I have also attached the project tcl file for the same.

    This seems to be a common issue with windows rendered with either font selection/color selection.

    It the window is being rendered I am unable to locate it in the desktop.
    Which is causing the main window of PAGE to not close cleanly, and have to kill the application.

     
  • Anonymous

    Anonymous - 2024-03-14

    It seems to be quite a fragile application.
    I was trying out the color options to change font/background color, and it seems to have completely corrupted the tcl project file.
    I have seem to lost all progress on the GUI design I was working with and am currently unable to recover the layout even from the backup files.
    Will try more and add comments, and share my observations.

     
  • Greg Walters

    Greg Walters - 2024-03-14

    Thank you for the quick responses.
    I can't ever remember anyone mentioning that they were running Fedora, but that could just be my old brain. I run Linux Mint and have run it under Ubuntu and never had any problems.
    I'll try to get a Fedora instance running in my Virtual box and test it out. Give me a day or two and I'll get back to you.
    Yes, please any other comments or observations would be welcome!

    Greg

     
  • Greg Walters

    Greg Walters - 2024-03-14

    I'm assuming it's Fedora 39 workstation, correct?

     
  • Greg Walters

    Greg Walters - 2024-03-14

    I've gotten a VERY base Fedora 39 workstation up and running. I got Python 3.12.2 running with Tkinter and PAGE 8.0 installed.
    I got the same error message that you did when I tried to edit the font on a standard Tk Button.
    So, now I have to go back to Don and find out what he thinks is causing it to crash.

    Hang in there.

    Greg

     
  • Anonymous

    Anonymous - 2024-03-15

    Thanks for the update.
    Yes, I am using the Fedora 39 Workstation.
    I am just curious about the project file corruption issue while trying to update the background color.
    I would probably stay away from such customization's, as it means loosing progress on a big design.

     
  • Greg Walters

    Greg Walters - 2024-03-15

    I didn't see the colour issue in my limited testing. Was it a Toplevel or a widget you were trying to change the colour of?

    Greg

     
    • Anonymous

      Anonymous - 2024-03-15

      Both, but it has somewhat a similar issue. If the color window is not closed cleanly, it would cause a similar failure as with the font customization.
      It would cause the page main window to not respond to any UI elements, and am unable to save the project and quit safely.

       
  • Greg Walters

    Greg Walters - 2024-03-15

    I threw together a small demo program that uses the Tk Fontchooser.
    Could you give it a try and let me know if there are any errors with it?
    This might help us narrow the font dialog issue.

    I'l start looking into the colour issues shortly.

    Greg

     
    • Anonymous

      Anonymous - 2024-03-15

      I am able run this example without any issues.

       
  • Greg Walters

    Greg Walters - 2024-03-15

    Another question (grasping at straws)...

    When you are trying to set the background colour for widgets (not Toplevel) are you using the "Standard" widgets or the Ttk Themed widgets?

    I have no problem setting the colour via the dialog for the Standard Tk widgets.

    Also, what is the theme you are using? This can be found in the PAGE main window, the dropdown just to the left of the "Relative"/"Absolute" button. By default it should be set to "default".

    Greg

     
    • Anonymous

      Anonymous - 2024-03-15

      I am not selecting any Widget Configuration assuming it is Standard by default.
      Theme is also set to default, as I am currently exploring PAGE to create light-weight GUI applications.
      The issue I am facing is while entering a text based color option in the Attribute Editor window. It is causing the top-level GUI layout to not render correctly the next time I am loading the project, sometimes the other top-level frames I have created for the applications do not even render correctly, it seems as if the tcl project file has gone completely out of sync.

       
  • Greg Walters

    Greg Walters - 2024-03-15

    When you say you are not selecting any Widget Configuration, I'm not sure that you and I are on the same page.

    Selecting a widget is done using the Widget Toolbar usually on the left side of the screen. There are three "sections". Tk Widgets, Themed widgets and Enhanced widgets.

    The Themed widgets USUALLY don't have any font or colour options. Those are taken care of by the Theme.

    Also I'm assuming that you are getting the colour dialog when you click on the background color button with the three dots, correct?

    You said "while entering a text based color option in the Attribute Editor window", are you entering a hex value into the entry widget for, let's say background color, or a colour name? In the colour dialog, there is an entry box under the Color: section (almost middle right of the dialog). If you are entering a bad color name (like "cormsilk3" instead of "cornsilk3" that entry box should turn a red color. It will turn a grayish color if you type the name correctly and there should be a small box above the word "Color:".

    Greg

     
    • Anonymous

      Anonymous - 2024-03-15

      I am using Tk Widgets only.
      I am yet to explore the other available widgets.

      Also I'm assuming that you are getting the colour dialog when you click on the background color button with the three dots, correct?

      Yes I am using the three dots button to open the colour dialog.
      I also tried entering a bad colour name through the entry box, it would work the first time, till the time the project is open.
      But when I had to close and re-open the same project, it would loose the complete context for the top-level frame, and widgets on that frame, and I will have to re-align/do the top-level frame from scratch again.

       
  • Greg Walters

    Greg Walters - 2024-03-15

    Well, if the dialogs (colour, font, etc.) aren't closing correctly, that would explain why the .tcl project file would get screwed up.

    When the Font dialog doesn't show up, PAGE is assuming it is is open, thus causing the "hang" in the window.

    I have tried a few times with the Colour dialog, but not multiple times. I'll try concentrating on that.

    All of this works fine on Mac, Windows 10 and 11 and Debian based Linux OS. As I said yesterday, this is the first time we've had anyone say they are using Fedora.

    I have proven that it is NOT Python 3.12.2, since I added (via Pyenv) a 3.11.4 and I'm getting the same issue with that. So it's not the Python version and as I said, PAGE works on all the other OS versions, so It must be something in Fedora causing issues. I've tried to make sure that Tkinter is properly installed in Fedora 39 as well as Tcl/Tk and I'm still having issues with the Font Dialog. Your ability to run the demo program I sent this morning seems to say that it isn't Tkinter or Tcl/Tk either.

    I'm sure it's something that I'm overlooking and Don will be able to point to the issue, once he gets to it.

    I'll keep you advised.

    I SUPPOSE there is always the "workaround" of you installing Ubuntu or Linux Mint in a virtual box, which SHOULD work. But I'm not to the point yet of really suggesting that. and there is always the possibility that the "host" OS might cause the "guest" OS to have the same problems.

    Also, I'm assuming that you are running GNOME in your Fedora workstation. Correct?

    Greg

     
    • Anonymous

      Anonymous - 2024-03-15

      Also, I'm assuming that you are running GNOME in your Fedora workstation. Correct?

      Yes It is a GNOME system.
      I will try on another system will post any other observations

       
  • Greg Walters

    Greg Walters - 2024-03-15

    Thank you!
    We'll keep working to figure this crazy issue out!

    Greg

     
  • Greg Walters

    Greg Walters - 2024-03-15

    We MIGHT have an answer for the font picker issue.

    Please download the attached zip file. Unzip it into the page distribution /page/lib .
    Then restart PAGE and give it a try.
    Please let me know if it works and if it makes a difference for the colour issue.

    Greg and Don

     
    • Anonymous

      Anonymous - 2024-03-15

      This seems to be working at-least the font selection and configuration window is visible.

       
  • Greg Walters

    Greg Walters - 2024-03-15

    AWESOME!

    Well, test it for a day or two and if you have any further issues, please let me know.

    Greg

     
    • Anonymous

      Anonymous - 2024-03-15

      I tried out the colour configuration window also for the Top-level background color change.
      I could crash page if one specifies color in quote in the text field.
      Here's a snippet for the error encountered:

      bgerror failed to handle background error.
          Original error: unknown color name ""blue""
          Error in bgerror: window name "err_top" already exists in parent
      

      After which the page application crashes/closes.
      And when recovering from the saved file leads to corrupt project.tcl file or lost progress.

       
  • Greg Walters

    Greg Walters - 2024-03-15

    No. Don't use quotes. That definitely will cause PAGE to crash.

    Either use a hex value (#d9d9d9) or a colour name without quotes (like cornsilk3 or skyblue2).
    There are a TONNE of colour names.

    Greg

     
  • Anonymous

    Anonymous - 2024-03-15

    Entering a garbage string in the background color also is not handled gracefully:

    bgerror failed to handle background error.
        Original error: unknown color name "fjhghjghj"
        Error in bgerror: 
    bgerror failed to handle background error.
        Original error: unknown color name "fjhghjghj"
        Error in bgerror: window name "err_top" already exists in parent
    

    There is a pop-up error message window if dismissed multiple time leads to same issue as the missing font window not rendering, and causing PAGE application to freeze and not respond.

     
1 2 > >> (Page 1 of 2)

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.