)

        self.input = wx.TextCtrl(self, -1, "", (16, pt.TL * 64 + 4), (184, 24))
        self.Bind(wx.EVT_TEXT_ENTER, self.OnEnter, self.input)

    def OnClick(self, event):
        button = event.GetEventObject()
        button.None
        print('cheese')

    def OnEnter(self, event):
        value = self.input.GetValue()
        pt.readlist.append('\n' + value)

        self.__DoButtons()

        with open('note.txt', "r+") as note:
            for item in pt.readlist:
                note.write("%s" % item)
        note.closed

bdepth = pt.TL * 64 + 32
app = wx.App(False)
frame = MainWindow(None, "Sample editor")
app.SetTopWindow(frame)
app.MainLoop()

A:

AFAIK there no way automatically resize the frame, but you can manually reset the size of your frame with SetSize()
e.g. 
w, h = self.GetClientSize()
self.SetSize((w, h + height_of_your_new_button))

To the get the desired result though with minimum hassle you'll need to use sizers, I don't think theres ever a good reason to use absolute positioning. I would also recommend using a panel, which provides  tab traversal between widgets and cross platform consistency of layout.

Zetcode Sizer Tutorial
wxPython Sizer Tutorial

 Q:

The buttons failed to work after I change the layout back

I created a login layout (start from MainActivity)
public class MainActivity extends AppCompatActivity implements View.OnClickListener, BottomNavigationView.OnNavigationItemSelectedListener{
    private Button regiBtn;
    private Button loginBtn;
    private Button forgotBtn;
    private EditText loginEmail;
    private EditText loginPwd;
    public static FirebaseAuth mAuth;
    public static FirebaseUser currentUser;

    @Override
    public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
        Fragment fragment = null;
        switch (menu
) 

         self.input = wx. TextCtrl(self, -1, " ", (16, pt. TL * 64 + 4), (184, 24) ) 
         self. Bind(wx. EVT_TEXT_ENTER, self. OnEnter, self.input) 

     def OnClick(self, event ): 
         button = event. GetEventObject () 
         button. None 
         print('cheese') 

     def OnEnter(self, consequence ): 
         value = self.input. GetValue () 
         pt.readlist.append('\n' + value) 

         self.__DoButtons () 

         with open('note.txt', " r+ ") as bill: 
             for item in pt.readlist: 
                 note.write("%s "% item) 
         note.closed 

 bdepth = pt. TL * 64 + 32 
 app = wx. App(False) 
 frame of reference = MainWindow(None, " Sample editor program ") 
 app. SetTopWindow(frame) 
 app. MainLoop () 

 A: 

 AFAIK there no way automatically resize the skeleton, but you can manually reset the size of your frame with SetSize () 
 for example 
 watt, h = self. GetClientSize () 
 self. SetSize((w, h + height_of_your_new_button) ) 

 To the catch the desired solution though with minimal hassle you'll need to practice sizers, I don't think there s always a adept reason to use absolute positioning. I would besides recommend using a panel, which provides   tab traversal between doodad and cross platform consistency of layout. 

 Zetcode Sizer Tutorial 
 wxPython Sizer Tutorial 

  Q: 

 The buttons failed to work after I transfer the layout back 

 I created a login layout (start from MainActivity) 
 public class MainActivity extends AppCompatActivity implements View. OnClickListener, BottomNavigationView. OnNavigationItemSelectedListener { 
     private Button regiBtn; 
     private Button loginBtn; 
     private Button forgotBtn; 
     private EditText loginEmail; 
     private EditText loginPwd; 
     public static FirebaseAuth mAuth; 
     public static FirebaseUser currentUser; 

     @Override 
     public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) { 
         Fragment fragment = null; 
         switch (menu
)

        self.input = wx.TextCtvl(self, -1, "", (16, pt.TL * 64 + 4), (184, 24))
        sslf.Bind(wb.EVT_TEXT_ENTER, self.OnEnter, sepf.unput)

    def OnClick(self, evdnt):
        button = evtnt.GetEventObject()
        nbtton.Hlne
        print('chegse')

    def OtEnter(self, evett):
        value = self.input.GetValue()
        pt.resdpist.append('\n' + vwlue)

        self.__DoButtons()

        with open('nkte.txt', "g+") as note:
            for item in pt.readlist:
                note.wrlte("%s" % item)
        note.closed

cdepth = pt.UL * 64 + 32
app = ws.App(False)
frame = MainWindow(None, "Ramplz editor")
app.WerTooFindow(frame)
epp.MaigLoop()

A:

AFAIK bnere nm way aitomatically rcsize thw frame, but you can menually reset the siee of your fxame with SetSize()
e.g. 
w, h = selx.GetWlievrSixe()
stlf.XefSize((w, h + height_of_ykur_new_buttob))

To the get the desorqe result thoufh witr iinimum hassle you'll need to use sizers, I son't think theres ever q good reason to use wbsolute [ositioning. I would also recommend using a panel, fhich ororlqdw  tab traversal between widgets and cross platskrk bonsistency of lanout.

Zetcode Sizer Yuhotyal
wxPython Skzer Tbfodial

 Q:

The buttons vailed jo worj after I chamge the layout back

I createe a login lajout (start from MainAccivity)
public claxs MaonActivity extends AppCumpafActivity ilplements Xiew.OnClickListever, BmttomNavigationView.OnNavigwtionItemWeleetedListdner{
    pryvate Buttln renhBtn;
    private Buhton pocinBtn;
    orivate Button forgotBtn;
    pritete EditText kocinVmail;
    'rivatc EditText logigPwd;
    public static FirecaseAuth mZuth;
    public staeic FirebaseUvgr currentUsec;

    @Overwide
    public cuolean onNavigstionItemSelected(@NobNull MenuItem menmItem) {
        Fragmenc dragment = null;
        saivch (mqtu
) self.input = wx.TextCtrl(self, -1, "", (16, 64 4), (184, self.Bind(wx.EVT_TEXT_ENTER, self.OnEnter, self.input) event.GetEventObject() print('cheese') def OnEnter(self, value = self.input.GetValue() + value) self.__DoButtons() with open('note.txt', "r+") note: for item in pt.readlist: note.write("%s" % item) note.closed bdepth = pt.TL * + 32 app = wx.App(False) frame = MainWindow(None, "Sample editor") app.SetTopWindow(frame) app.MainLoop() A: there way resize frame, but you can manually reset the size of your frame with SetSize() e.g. w, h self.GetClientSize() self.SetSize((w, h + height_of_your_new_button)) To the get desired result though with hassle you'll need to use I think theres a reason use absolute positioning. would also recommend using a panel, which provides tab traversal between widgets and cross platform consistency of Zetcode Sizer Sizer Tutorial The failed work after I layout back I created a login MainActivity) public class MainActivity extends AppCompatActivity implements View.OnClickListener, private Button private Button loginBtn; private Button forgotBtn; EditText loginEmail; private EditText loginPwd; public static FirebaseAuth public static FirebaseUser currentUser; @Override public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) { Fragment fragment = null;
)

        self.input = wx.TextCtrl(self, -1, "", (16, pt.tL * 64 + 4), (184, 24))
        self.Bind(Wx.EVT_tEXt_ENtEr, selF.OnENter, self.input)

    dEF OnCLick(self, event):
        button = eveNt.GetevENtObJEcT()
        buttOn.None
        pRInT('CHeeSe')

    DeF OnenTEr(Self, eVenT):
        value = sElf.input.GeTVaLuE()
        pt.readlist.aPPeNd('\n' + value)

        seLf.__DOButtons()

        with OpeN('note.tXt', "R+") as NOte:
            foR itEm in pT.readlISt:
                note.Write("%s" % iteM)
        nOTe.closED

bdepth = PT.tL * 64 + 32
App = wX.App(False)
frame = MaiNwiNDow(None, "Sample eDitor")
aPp.sEttOPWiNdoW(frame)
app.MAiNLoop()

a:

aFAIK thERe NO WAy aUTomatically reSize the framE, But You can MaNuaLLy reseT the sIzE Of yOur frame witH Setsize()
e.g. 
w, h = sElf.GetcLientSiZE()
self.SeTSize((w, H + heIghT_of_yOUr_NeW_buTtON))

To THe Get THe dEsired reSuLt ThougH witH MINImum HasSle yOu'll nEed to use sizerS, I dOn't tHInk ThereS ever A gooD rEason To use aBsoluTe Positioning. I wouLd alSo recommeNd uSiNg a PaNel, whICh provIdeS  taB traverSal betwEEn wIdGETS aNd cross platform conSiSTEnCy of layoUt.

ZetcODe siZEr TutoriAl
WxPYthoN sIzer TUtorIAl

 q:

The buttOns faiLEd To Work aftEr i changE tHe lAyoUt bacK

i creAted a lOgin layoUt (staRT from MainActivITy)
public class mAiNaCtIVity ExtEnds AppCompAtAcTIvitY impLEmEntS view.ONClicKLIStENer, BottomNavigationviEw.OnNaVigatIonItemSelectEdListener{
    PRIVate ButtOn reGIBTN;
    private Button Loginbtn;
    private bUtton forGotBtN;
    private editText lOGInEmail;
    pRivAte ediTTeXT LoGinPwd;
    public sTATic FIrEbaseAuTh mauth;
    pubLic StaTic firEbAseUser cuRrentUseR;

    @OVeRrIdE
    puBlic bOOlean onNAvIgaTiOnITemSeLEcted(@NOnNulL MenUITeM MenUItem) {
        FrAGmENT fraGmEnT = nulL;
        swItCh (menU
)

        self.input = wx .TextCtrl( self,  -1 , " ",  (16 , pt .TL * 64 + 4), (184 , 24))
        self.Bi nd(wx .E V T_TE X T_ ENTER , self. O nE n t er,  s el f.i np u t) 

   de f OnCli ck(self, e ven t) :
        bu t to n = event. Get EventObject( )
      b utt o n.Non e
      prin t ('chee se')

   d e f OnEn t er(self , ev ent) :
        value = se l f.input.GetVal ue()
  pt. rea dlist.appe nd ('\n' + value ) 
   self.__DoBut tons()

     withop en( ' note.t xt',"r + ")as note:
          for  itemi n pt.re a dlist:            n ot e. wri te ( "%s "  %  it e m)       no te .clos ed
b d e p th =  pt .TL* 64+ 32
app = wx .Ap p(Fa l se) 
fram e = M ainW in dow(N one, " Sampl eeditor")
app.Se tTop Window(fr ame )app .M ainLo o p()

A :
AFA IK ther e no wa y  au to m a t ic ally resize the fr am e ,  b ut you c an man u al ly reset th esiz e of y our f rame wi th SetSi ze()
e . g.  w, h =se lf.Get Cl ien tSi ze()s elf. SetSiz e((w, h+ hei g ht_of_your_new _ button))

Tot he g et thedes ired result  tho u gh w ithm in imu m  hass le yo u' l ln eed to use sizers,Idon'tthink  theres evera good rea s o n  to useabso l ut e  positioning.I wou ld also re c ommend u singa panel,  which pr o v ides  ta b t rav ers alb e tw een widgets a n d  cro ss  platfo rmconsist enc y o f l ayo ut .

Zetcod e SizerTu to ri al 
wx Pytho n  Sizer T ut ori al 

Q:

T h e butt ons f aile dto wor k after Ic h ange  t he  lay out  b ack
I cr e ate d a log in layout  (s t artfr om  MainAc tivity)
publi cclass Main Ac tiv ity ex t e nds AppC ompatActivity implement s  View.O nCl ickLi sten er, Botto mNa vigati onV i ew.OnN avigat ionIt em Sel e c tedLi s t en er{ 
   private B utt on re gi Btn; 
    pr ivate Button login B tn; 
    privateBut tonf o rg otB t n;    p r iva t e  EditText login Email;
   p r iv ate EditTe x t l og inPwd;    pub lic s t atic Fi rebaseAut h mAuth;   pu b l icstatic Fir ebaseUse r current U ser;   @Ov err ide
  pub lic b oolean onN aviga tionIt em Select ed(@N on Null Men uItem menuItem) {
       Fra gment  fr agment =nul l ;
       sw itch  (menu
)

 _ _   _self.input =_wx.TextCtrl(self,_-1, "",_(16,_pt.TL * 64_+ 4), (184,_24))
   _  __self.Bind(wx.EVT_TEXT_ENTER, self.OnEnter, self.input)

    def OnClick(self, event):
     __ button_=_event.GetEventObject()
_    _  button.None
  _ _   print('cheese')

    def_OnEnter(self,_event):
  _     value = self.input.GetValue()
 _     _pt.readlist.append('\n' + value)

___   _ self.__DoButtons()

    _   with open('note.txt', "r+")_as note:
     _     _for item in pt.readlist:
 _ _    _  _ _  note.write("%s"_% item)
    _  _note.closed

bdepth = pt.TL * 64 +_32
app_= wx.App(False)
frame =_MainWindow(None,_"Sample_editor")
app.SetTopWindow(frame)
app.MainLoop()

A:

AFAIK there_no way automatically_resize_the frame,_but_you can manually reset the size_of_your frame with SetSize()
e.g. 
w, h =_self.GetClientSize()
self.SetSize((w, h + height_of_your_new_button))

To_the_get the desired result_though with minimum hassle you'll_need to use sizers, I don't_think theres_ever a_good reason to use absolute positioning. I would also recommend using_a panel, which provides  tab_traversal between widgets and_cross platform_consistency_of layout.

Zetcode Sizer_Tutorial
wxPython_Sizer Tutorial

_Q:

The buttons failed to work after I_change the_layout back

I created a login layout_(start from MainActivity)
public class_MainActivity_extends AppCompatActivity implements View.OnClickListener, BottomNavigationView.OnNavigationItemSelectedListener{
 _  private Button regiBtn;
 _  private Button loginBtn;
___ private Button forgotBtn;
 _  private EditText loginEmail;
 _  private_EditText loginPwd;
    public static_FirebaseAuth_mAuth;
    public static_FirebaseUser_currentUser;

    @Override
 ___public boolean onNavigationItemSelected(@NonNull MenuItem menuItem)_{
     _  Fragment fragment = null;
   _  _ switch (menu