def METHOD_NAME(self, event):
    ''' Change between network and serial connection options '''
    choice = self.choiceConnection.GetString( self.choiceConnection.GetSelection())
    if choice in ["udpin", "udpout", "tcpin", "tcp"]:
        self.choiceSerialPort.Disable()
        self.choiceBaud.Disable()
        self.labelSerialPort.Disable()
        self.labelBaud.Disable()
        self.textConIPPort.Enable()
        self.labelConType.Enable()
    else:
        self.choiceSerialPort.Enable()
        self.choiceBaud.Enable()
        self.labelSerialPort.Enable()
        self.labelBaud.Enable()
        self.textConIPPort.Disable()
        self.labelConType.Disable()
        self.choiceSerialPort.Clear()
        ports = mavutil.auto_detect_serial(preferred_list=MAVProxy.modules.mavproxy_link.preferred_ports)
        for p in ports:
            self.choiceSerialPort.Append(p.device)
        self.choiceSerialPort.SetSelection(0)