Hi there! I have a little problem regarding the tcltk2 package. I have created a simple GUI and a button within which, when pressed, opens up another window. The problem I have is that the icon I specify to appear in the second window does not appear. Do you have any idea why? Example code: tt = tktoplevel(background = "black") # Creates the body of the GUI. tktitle(tt) = "Backtest" # Creates a window title. ilogo = tk2ico.create("H:/GUI/icons/ilogo.ico") # Icon created. tk2ico.set(tt,investeclogo) # This assigns the icon to the main window. masterframe = tkframe(tt) tkgrid(masterframe) # Button test.but = tkbutton(masterframe,text = "Run",command = openwindow) tkpack(test.but, side = "top")
openwindow = function(){ ruv = tktoplevel() tktitle(ruv) = "Test Window" ilogo2 = tk2ico.create("H:/GUI/icons/ilogo.ico") tk2ico.set(ruv,ilogo2) topMenu = tk2menu(ruv) tkconfigure(ruv,menu = topMenu) fileMenu = tk2menu(topMenu, tearoff = FALSE) tkadd(fileMenu,"command", label = "Quit", command = function()tkdestroy(ruv)) tkadd(topMenu,"cascade",label = "File", menu = fileMenu) MasterFrame2 = tkframe(ruv) tkgrid(MasterFrame2) } Thanks and Regards! http://www.investec.com/EmailDisclaimer/emaildisclaimer.htm The disclaimer also provides our corporate information and names of our directors as required by law. The disclaimer is deemed to form part of this message in terms of Section 11 of the Electronic Communications and Transactions Act 25 of 2002. If you cannot access the disclaimer, please obtain a copy thereof from us by sending an email to: [EMAIL PROTECTED] [[alternative HTML version deleted]] _______________________________________________ R-SIG-GUI mailing list R-SIG-GUI@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui