
*) deleting "anchor" or "sticky" entries still saves those options to def file as ""
   ERROR... results
   
*) OptionMenu with "anchor" results in ERROR...

*) Editing Label "anchor" property does not show up in python source.

*) When setting Button background color, also set activebackground color

*) in Button Click methods, include button text in print statement
    print( "executed method Button_5_Click (Grab to Clipboard)" )

*) Add sticky to Canvas_1 (only does Canvas_1_frame right now)
        self.Canvas_1.grid(row=0, column=0, sticky="nsew")
        
        *) also need canvas frame to match any weight settings.
        self.Canvas_1_frame.rowconfigure(0, weight=1)
        self.Canvas_1_frame.columnconfigure(0, weight=1)


*) need canvas scrollregion setting if scrollx and scrolly
   self.Canvas_1.config( scrollregion=(0,0, 1920,1080) )

*) Font dialog should show entire printable set as option.

*) in Dialog self-test area, have user setup "protected" area.

*) When reading a file, delay PreviewWin update until the very end.

*) Read *.def file to make a Qt app.

*) Button to open *.py file in editor

*) Button to run *.py file.

*) Make controls on edit page more friendly (spinboxes, dropdowns)
*) add validators (like int() on weight)

*) sample *.def files in def_samples subdirectory.
   Provide some basic library layouts.

*) clean up #print ...

*) Add listbox current selection to dialog automatic result dictionary.

*) Two Debug buttons... both need to be result of DEBUG flag.

*) padx, pady... apply to grid, widget or both?

*) Need test suite for py 2.7, 3.7, 3.6, 3.5 for Windows and Linux.
   - torture test
   - GUI driven tests (compare output files?)

*) Ctrl-Click to select multple widgets and edit common properties

*) User defined widget combos.  e.g. scrollx, scrolly options on Text, Listbox, etc.
   - maybe Notebook Tab widget combo ( i.e. Frame or LabelFrame with notebook.add command)
   - Place into "duplicate widget" area.
   - *** select for placement, a multi-component widget from examples group. ***

*) Option to "save clean" python file... w/o all the comments and print() statements
   (maybe always save to a "clean"/"raw"/"patient_zero" file???)

*) Warn user if target python file was not generated by TkGridGUI

*) On save, make a popup to describe everything that will be done... 
   DEF and py files as well as directory of save.
   After Save, offer option to launch py file.

*) Drop scrolling onto main window and widgets like Text
   (i.e. allow main window to scroll)

*) Provide Sroll Left/Right/Up/Down controls... (i.e. change starting row/col)
   (need to limit display to some number of rows and columns)

*) combine common parts of right-click PreviewWin and grid_notebook.

*) Consider only including user-defined OK and Cancel buttons in dialog
   (i.e. they call self.ok and self.cancel by default)

# ========================= Low Priority =========================
*) Save hangs when no file name given... need a warning.

*) switch to Style definitions (see: https://docs.python.org/3/library/tkinter.ttk.html )
        style = ttk.Style()
        style.configure("BW.TLabel", foreground="black", background="white")

        l1 = ttk.Label(text="Test", style="BW.TLabel")
        l2 = ttk.Label(text="Test", style="BW.TLabel")

*) Add toolbar for things like "Add Row", "Add Col", etc.

*) look to add file history (both in TkGridGUI and the target app)

*) Maybe make docstring more specific to widget_type

*) Resizable should affect PreviewWin

*) Undo/Redo ???

*) look to add state saving in target app.
   (i.e. save all StringVar and widget states.)

# =========== fixed, but might have future worries ================
*) a duplicate paste with colspan needs to repaint the grid.
   Fixed by adding repaint_all_labels, but if it's placed before refresh_preview_win, there's an error.
                self.grid_gui.refresh_preview_win()
                self.repaint_all_labels()

*) TOO MANY ROWS or COLUMNS... Add logic to slide view window with Display Row and Display Col spinboxes
*) Need max rows and columns < 99 to protect weight controls
   (put in hard limit of 10 cols, 15 rows)

*) refresh_preview_win() destroys and rebuilds everything... is that always good?
      added  allow_destry_children=False for a couple of calls, most should destroy children

*) Notebook does not have background attr for highlights (i.e. Style)
        ... used borderwidth on pw_frame???

*) Can Tabs have scroll bars?

*) Move button is not changing .grid positions in *.py file.
    (seems OK now)

*) Add Notebook Tab as a grid target. (gray out Listbox and only allow tabs on Notebook tab.)
   *** Simply gray out everything but Frames... i.e. each tab is a Frame.

*) add underline and accelerator to menu commands.
   still need to create key bind command.
   top_File.add("command", label = "New", command = self.menu_File_New, \
                underline=0,accelerator="Ctrl+N")

*) statusbar on dialog can only work with user-defined OK and Cancel buttons
   (i.e. statusbar is above default OK and Cancel buttons)

*) Open of second file does NOT clear old widgets.

*) Use row 3 of Label widgets on grid_notebook for text labels
    (need to generalize the setting of Label text)

*) PreviewWin is placed underneath grid_notebook when CLI opens it.

*) In dialogs, statusbar is using .pack AND parent is self.master not dialogframe
   (how about main?)

*) drag and drop move is broken... maybe line3 logic???
      set_label_text_bg_from_widget_name broke it.
      
    Moving entry widgets on Tab2 of nb switches to Tab1
    
    Opening second file has errors in maybe_add_component with old components

*)  Moving entry widgets on Tab2 of nb switches to Tab1
    *** After an "Open" tab switching stops working.

*) Create dialog for option to save before open or exit.
    
*) Need a "been_changed" flag for exit w/o save
     ... added reset_crc_reference() to target_app

*) Menu New option... make it delete all and start over.
   (with popup warning if "been_changed"
   -- Needs to remove any menu from PreviewWin

*) selecting Tab_2 on grid_notebook does NOT trigger Tab_2 on PreviewWin before visiting PreviewWin

*) add code to setup.py for CLI launch
    --- added, but need to test

*) Need Delete Col and Row controls activated.
   ---> Remove delete and make two different Inserts, one before  and on after col or row.
*) write delete logic for Tab.

*) Delete Frames, LabelFrames and other container objects.
   (i.e. delete tabs from Notebook)
   ... Only allow delete if they are empty???
   ... Give warning of all the widgets that will be deleted.
       (May have container inside container)

*) If widget is clicked in PreviewWin, switch grid_notebook to its tab_label

*) clean up print(...)

*) Help screen needs to call out Left Click, Drag and Drop, Right Click.
   Click on listbox for generic widget
   Left Click on widget to place a duplicate

*) get rid of "print( 'apply called' )"

*) check that anchor attritute on all widgets that might apply

*) Menu editor self-closes on my Linux laptop
    (machine needed update)

*) Save message should include both def and py file names.

*) get rid of mouse_location prints

*) double check how to insure requirements.txt modules are installed.

*) Save after Open does not go to Open directory
   (i.e. doesn't remember directory of opened file)

*) Linux "pip install configparser"

*) str vs. unicode using key=str.lower in sorted.

*) make tkinter.ttk outside of sys.version (i.e. remove sys.version)
    (NO... needed for Dialog)
    if sys.version_info < (3,):
        from tkSimpleDialog import Dialog
    else:
        from tkinter.simpledialog import Dialog

*) remove tkMessageBox, tkColorChooser, tkFileDialog from generated source code.

*) add "from_" to edit_Dialog for Scale widget (Spinbox has it correct)
    

*) add exportselection to default Listbox settings.
   self.Listbox_2.configure( exportselection=False ) # stay highlighted after focus leaves

*) add onEnter and onLeave with cursor change for weight controls

*) add in user area of generated code things like listbox and menubutton initialization
   (add comment next to widget creation)
   *** Worry about statusbar added after 1st save??? not put in user area???
   *** Worry about anything added after 1st save that puts things into user area

*) ctrl or alt keys for menu commands

*) The choice to duplicate a widget on one tab is lost when another tab is selected.
   If changing tab with a dup widget, save it and restore it.

*) New needs to reset all numbering to start at 1 for widget names.

*) ERROR... Canvas "wrap"
    File "clip_canvas.py", line 124, in make_Canvas_1
        self.Canvas_1.config( wrap=NONE ) # x scroll implies no wrap
