title: How to manage and group different frames in tkinter?
body: <p>I've seen some good posts here about adding multiple <em>frames</em> inside <strong>Tk  root</strong> ( <a href="https://www.youtube.com/watch?v=jBUpjijYtCk" rel="nofollow noreferrer">tut_version</a> <a href="https://stackoverflow.com/questions/46161761/python-2-7-tkinter-multiple-frames-and-menu">stckovrflw_version</a> ). But i've didn't seen any 
  way of referencing the window that is currently active. After some digging into <code>dir(Tkinter. Tk)</code> and reading help for <code>tkraise</code> I understood that there is a figurative <code>stack</code> element to <code>Tk</code> ( which it may be 'Tk. frames' or something ).  </p>
  
  <p>Stack element for <code>python-2.x</code> and <code>python-3.x</code> is determined by <em>dictionary</em> which holds name of the frames which is then called by <strong>tkraise</strong> passing a key to the dictionary.</p>
  
  <p>As I understood the most of software built like this is based upon <em>tkraise() and don't think about it</em>, but what happens when I need to pass an specific frame in a stack a data where each frame will processes it differently - like waveform and spectral analyser of wave signal?    </p>
  
  <hr>
  
  <p>Since it was pointed out to me that question isn't clear enough, I wanted to show an image of what I want to achieve. Depending on the scope of the GUI changes that affect frames aren't direct or linear - often needing to manipulate different frames at same time, frames that aren't in same position and can't be relied upon to be active at the same time. </p>
  
  <p><a href="https://i.stack.imgur.com/DATmt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DATmt.jpg" alt="desired layout functionality"></a></p>
  
  <ul>
  <li><strong>Local change</strong>  - change that happens when event is triggered that affect only 1 frame buffer.  </li>
  <li><strong>Group change</strong>  - change that happens when event is triggered that affect multiple frame buffers.   </li>
  <li><strong>Global change</strong> - change that affects whole global buffer, and therefore it influences an whole GUI.  </li>
  </ul>
  
  <p>In general this kind of layout would be done via UDP protocol, with each frame having unique address and then having server that routes to frame buffer/stack that it needs. That would however need an independant thread with server that would read/write to the buffers when client sends an request. But on this occasion, I wanted to take advantage on tkinter natural threading functionality and use threads to read/write to desired buffer states when event is triggered, and to do that I need to know where I can find my frame and its buffer.  </p>
  
  <p>Then frame class could preload frame buffer (which is smaller in size than global buffer) when it is displayed and any changes to the frame buffer would be able to remain local, influence another frame buffer or change global buffer.  </p>
  
  <p><em>But all that hinders on the fact I can't call on specific buffer within frame to make changes to if i don't know ID of the frame.</em></p>
  
  <hr>
  
  <p><strong>How do I know which frame is on top in the stack ( since dictionary are not sorted python type )? And how to access specific frame in stack ?</strong></p>