Menu

Need some labelling!

Anonymous
2022-04-19
2022-04-26
  • Anonymous

    Anonymous - 2022-04-19

    When you have dozens of labels and controls, it can be hard to remember the layout. Can we have a button or mode or pop up that to temporarily overlay the name of the objects onto the screen (or generate one)? They could be centered on the object, or maybe in the object corner. That would be a great aid! Then you can do a screen print capture, or maybe have a save image option. ANYTHING would be better than nothing! An manual example is attached. Automation is welcome!

     
  • Greg Walters

    Greg Walters - 2022-04-19

    I can't think of anything that PAGE could do that would be like something you are requesting. However, I have to say that I'm running on no sleep for almost 24 hours. I will certainly pass this on to Don to get his thoughts. I can see the benefit to having something like this, but as I say, I can't think of how this would be accomplished in VTcl. Again, Don is the VTcl guru, so maybe he could come up with something

    I was originally thinking that your request was originally to do this for Label widgets but now that I see your example image, and re-read your request, I see that you would like this for every type of widget. Also, looking at your image, it would be difficult to do some sort of "floating overlay" to ensure that each floating label when turned on would not obscure another one.

    Again, looking at your image, I'm assuming that you are asking for the widget Alias to be displayed (assuming that could be done).

    Like I said, I'll pass your request on to Don and we'll see what he can come up with.

    Greg

     
  • Anonymous

    Anonymous - 2022-04-19

    I'd think it could create a list of temporary dummy labels, one for each object with the text set to the object name (alias) & positioned at the object center. Then when done, with showing, it could wipe them all out. I wonder if a python script could do similar...since python can get a list of all objects & their attributes (then this could be done outside of page).
    Usually when coding, page is long closed up weeks ago, so it can be hard to remember what certain items are called (so I scroll around the lengthy page files to find them).

     
  • Jean Pierre Chaminade

    Hi Anonymous,
    I don't really understand your request.
    When you design your interface, you give a name to your objects, and make a binding to your support module. From support module, by writing "_w1. " (by default) the auto completion of your editor will show you your objects names from the design module.
    The real problem, is to establish a naming convention.
    In support module, you can add a docstring with the name of the object and the event(s) that calls the function. So you can automatically generate the documentation of your app (with pdoc3 for example).
    In your picture, you have controls concerning temperature :
    You can organize your interface with : TempBtnPlus, TempBtnMinus, TempEntryInputValue, TempLblMesuredValue etc.
    So in your support module, by typing _w1.Temp, you get what concern temperature, by adding Btn, all the buttons regarding the temperature.
    Also, you create a file called MyAppTemperature.py, and put within all temperatures functions with naming convention and docstring too.
    In support file, you add : from MyAppTemperature import * So, using the auto completion, you can access all your temperature functions, the docstring of each function will appear.
    I encourage you to use this coding "hygiene" .
    Further, you can work on a virtual machine. If you have minor changes to do 5 or 6 years later, you start your virtual development environment of this old application, and avoid the hassle of rebuilding your development config, or rewriting some parts of code with the new versions of your programming language and modules (if they already exists 6 years later for your python 4 or 5).
    I've been coding for 30 years, and encountered a lot of such disappointments :)
    Happy Coding
    J-Pierre

     
  • Anonymous

    Anonymous - 2022-04-26

    Hi J-Pierre...that is an interesting idea, and has good uses. However, I'm suggesting a visual reference, since we are making a visual layout. For example there may be two label fields, one for tank pressure and one for motor rpm... which one is which and what are the names (maybe the one we think is for motor rpm, is actually for motor voltage & motor rpm is actually nearby)? Having a visual diagram is the most immediate way of telling these things, or remembering any oddball names (the chicken and egg problem).

    I do like your idea in the way you propose organizing names...I'm going to give that more thought. I also like the idea of you create a file called MyAppTemperature.py, and put within all temperatures functions with naming convention and docstring too.
    In support file, you add : from MyAppTemperature import So, using the auto completion
    , however with all of the different screens , I am trying to reduce the number of files. Maybe if I use Pycharm it will be better suited for working with many files at once.

     
  • Jean Pierre Chaminade

    Perhaps it's a problem of your editor. Personally i use Microsoft VSCode on Win10 and Ubuntu 21.04 : Works very well, and help to increase productivity.
    Auto-completion sample as attachment :

     

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.