• 0

    posted a message on How can i add a Icon to my Frame
    I have a little problem here. I want to put in a frame each one Dropdown and an icon. Unfortunately, I can not see or check if it was loaded at the icon. Here is the code...
    	--EventMethoden
    	local profIcon = AceGUI:Create("Icon")
    	local function ProfSelectedCallback(this, event, item)
    		profIcon:SetImage(professions[item].Texture)
    	end
    
    	-- Erstellen des MainFrames
    	local frame = AceGUI:Create("Frame")
    	frame:SetTitle("PimpMyProfession")
    	frame:SetStatusText("PimpMyProfession Status")
    	frame:SetLayout("Flow")
    	
    
    	profIcon:SetImageSize(64,64)
    	profIcon:SetWidth(64)
    	profIcon:SetHeight(64)
    
    	local pmpDD = AceGUI:Create("Dropdown")
    	pmpDD:SetCallback("OnValueChanged", ProfSelectedCallback)
    
    	local lprof = {}
    	table.foreach(professions, function(k,v)
    			lprof[k] = v.Name	
    	end)
    	pmpDD:SetList(lprof)
    	if lprof["prof1"] ~= nil then
    		pmpDD:SetValue("prof1")
    		profIcon:SetImage(professions["prof1"].Texture)
    	elseif lprof["prof2"] ~= nil then
    		pmpDD:SetValue("prof2")
    		profIcon:SetImage(professions["prof2"].Texture)
    	end
    
    	frame:AddChild(pmpDD,profIcon)
    
    

    Any help would be appreciated.

    P.S: Sorry for my bad english ;)
    Posted in: Need Help?
  • To post a comment, please or register a new account.