View Single Post
Old 03-12-10, 03:13 PM   #1
AOTD_Rhonen
A-ganger
 
Join Date: May 2006
Posts: 76
Downloads: 31
Uploads: 0
Default [REQ] How Add an Event in Python

Hi guys,

anyone can help me by adding an Event on a Button?
Code:
def InitializeScript():
    
    Show = False
    Pagerecognitionmanual_Recmanual_Unit.Visible=False
    Pagerecognitionmanual_Recmanual_Criticalzones.Visible=False
    Pagerecognitionmanual_Recmanual_Cover.Visible=False
    Pagerecognitionmanual_Recmanual_Openbook.Visible= True
    SetReconEvents()
    
    #pass

def SetReconEvents():
    ScriptManagerManaged.ShowPythonError("SETEVENTs")
    Pagerecognitionmanual_Recmanual_Cover_Close.MouseLeftButtonClicked += OpenCloseManual
    Pagerecognitionmanual_Recmanual_Openbook_BtnOpen.MouseLeftButtonClicked += OpenCloseManual
    #pass

def OpenCloseManual():
    ScriptManagerManaged.ShowPythonError("EVENT")
So i get my Initialize and i get my Message on SetReconEvents()

But if i click on the BtnOpen ingame, nothing happens... so OpenCloseManual() is not handled ... Any Ideas?

And yes, i am working on the Reconitionmanual.
Both, Pagerecognitionmanual_Recmanual_Cover_Close.MouseL eftButtonClicked and Pagerecognitionmanual_Recmanual_Openbook_BtnOpen are Buttons
__________________

Member of A.O.T.D


Es gibt zwei Arten von Bugs
1. Programmfehler
2. Fehler zwischen Monitor und Sitzlehne

Die 2. sind die schlimmeren, denn die kann man nicht beheben.
AOTD_Rhonen is offline   Reply With Quote