Çözüldü Bu hatada ne diyor

  • Konuyu açan Konuyu açan mehmet07
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 4
  • Gösterim Gösterim 150
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

mehmet07

Üye
Üye
Mesaj
320
Çözümler
7
Beğeni
57
Puan
479
Ticaret Puanı
0
Aldığınız hataları ekran görüntüsü olarak değil, kod bloğu ile kullanarak konuya ekleyiniz.
Bir pencere buton ekledim ama böyle bi syser veriyor buton çalışmıyor hata ne demek istiyor
 
Çözüm
def __ClickPrevButton(self):
def __ClickNextButton(self):

arat ikinide değiştir.


dosyada değiştir.:
Genişlet Daralt Kopyala
*****************************************************************************************
def __ClickPrevButton(self): üstüne ekleyin


    def _GetDescLineHeight(self):
        if hasattr(event, "GetLineHeight"):
            return event.GetLineHeight(self.desc_index)

        if hasattr(event, "GetTextSize"):
            w, h = event.GetTextSize(self.desc_index)
            return h

        return 16

    def _GetTotalLineCount(self):
        if hasattr(event, "GetProcessedLineCount"):
            return event.GetProcessedLineCount(self.desc_index)
        if hasattr(event, "GetLineCount"):
            return event.GetLineCount(self.desc_index)...
bir tane dosyada varuda uiminigamerumi py içinde syserdede görünen 378 satırda bu şekilde var

def __ClickNextButton(self):
line_height = event.GetLineHeight(self.desc_index) + 4
if localeInfo.IsARABIC():
line_height = line_height - 4
 
def __ClickPrevButton(self):
def __ClickNextButton(self):

arat ikinide değiştir.


dosyada değiştir.:
Genişlet Daralt Kopyala
*****************************************************************************************
def __ClickPrevButton(self): üstüne ekleyin


    def _GetDescLineHeight(self):
        if hasattr(event, "GetLineHeight"):
            return event.GetLineHeight(self.desc_index)

        if hasattr(event, "GetTextSize"):
            w, h = event.GetTextSize(self.desc_index)
            return h

        return 16

    def _GetTotalLineCount(self):
        if hasattr(event, "GetProcessedLineCount"):
            return event.GetProcessedLineCount(self.desc_index)
        if hasattr(event, "GetLineCount"):
            return event.GetLineCount(self.desc_index)
        if hasattr(event, "GetTextLineCount"):
            return event.GetTextLineCount(self.desc_index)
        if hasattr(event, "GetTotalLineCount"):
            return event.GetTotalLineCount(self.desc_index)
        if hasattr(event, "GetEventSetLineCount"):
            return event.GetEventSetLineCount(self.desc_index)

        return -1

***********************************************************************************************
değiştirin


    def __ClickPrevButton(self):
        line_height = 16
        if localeInfo.IsARABIC():
            line_height = 12

        cur_start_line = event.GetVisibleStartLine(self.desc_index)
        if cur_start_line <= 0:
            return

        decrease_count = min(cur_start_line, SHOW_LINE_COUNT_MAX)
      
        new_start_line = cur_start_line - decrease_count
        event.SetVisibleStartLine(self.desc_index, new_start_line)

        self.desc_y += (line_height * decrease_count)

    def __ClickNextButton(self):
        line_height = 16
        if localeInfo.IsARABIC():
            line_height = 12

        cur_start_line = event.GetVisibleStartLine(self.desc_index)
        total_line_count = self._GetTotalLineCount()

        if total_line_count == -1 or cur_start_line + SHOW_LINE_COUNT_MAX >= total_line_count:
            return

        increase_count = SHOW_LINE_COUNT_MAX
        if cur_start_line + increase_count > total_line_count:
            increase_count = total_line_count - cur_start_line

        event.SetVisibleStartLine(self.desc_index, cur_start_line + increase_count)

        self.desc_y -= (line_height * increase_count)
 
Son düzenleme:
Çözüm
def __ClickPrevButton(self):
def __ClickNextButton(self):

arat ikinide değiştir.


dosyada değiştir.:
Genişlet Daralt Kopyala
def __ClickPrevButton(self):
        line_height = 16
        if localeInfo.IsARABIC():
            line_height = 12

        cur_start_line = event.GetVisibleStartLine(self.desc_index)
        if cur_start_line <= 0:
            return

        decrease_count = min(cur_start_line, SHOW_LINE_COUNT_MAX)
       
        new_start_line = cur_start_line - decrease_count
        event.SetVisibleStartLine(self.desc_index, new_start_line)

        self.desc_y += (line_height * decrease_count)

    def __ClickNextButton(self):
        line_height = 16
        if localeInfo.IsARABIC():
            line_height = 12

        cur_start_line = event.GetVisibleStartLine(self.desc_index)
        total_line_count = self._GetTotalLineCount()

        if total_line_count == -1 or cur_start_line + SHOW_LINE_COUNT_MAX >= total_line_count:
            return

        increase_count = SHOW_LINE_COUNT_MAX
        if cur_start_line + increase_count > total_line_count:
            increase_count = total_line_count - cur_start_line

        event.SetVisibleStartLine(self.desc_index, cur_start_line + increase_count)

        self.desc_y -= (line_height * increase_count)
Çok teşekkür ederim Ensar bey
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst