• Derma DMultiChoice
    4 replies, posted
So, I tried to make my DMultiChoice's text colored, but it didn't work. Here's what I tried to do, is there someway of making this work? [code]local List = vgui.Create("DMultiChoice", frame1 ) for k,v in ipairs(player.GetAll()) do local myLabel= vgui.Create("DLabel", myParent) myLabel:SetText(v:Nick()) myLabel:SizeToContents() List:AddChoice(v:Nick()) List:SetText(myLabel) List:SetPos( 50, 50 ) List:SizeToContents() function List:OnSelect(index,value,data) print("The index is: "..index.."\n") print("The value is: "..value.."\n") print("The data is: "..data.."\n") end end[/code]
I fail to see anything that has something to do with colors, but okay. I don't think it's possible since the text entry drawing code is not coded in Lua and its text color can't be changed without a skin.
As I already told you once, you make your DMultiChoice with no text. Then you make a label and position it where the text of the DMultiChoice would be. This isn't a difficult concept.
Okay, but what about the options? How can I make those different colors? You need to be able to select them, so a label won't cut it.
Try having a button over the label, but set the buttons opacity to 0.
Sorry, you need to Log In to post a reply to this thread.