mint3d Posted January 28, 2017 Share Posted January 28, 2017 Does anyone know any way to get the name of the parent GUI? I'm making a conversion in the DX Lib, but it requires GUI Parent, and when you're converting it they're all going to be called different things, you know any way to get the parent gui name? win = createWindow((screenW - 444) / 2, (screenH - 337) / 2, 444, 337,{0,0,0,150},"test") tab1 = createTab(9, 58, 109, 35,"Tab 1",true,win,false) As you can see above, in the createTab, it shows win being the parent, but say I had to replace win with parent, would there be anyway to get something like; for i,v in pairs(getElementsByType ( 'gui-'.."tabpanel",root)) do local parent = getGuiParent(v) Link to comment
Addlibs Posted January 28, 2017 Share Posted January 28, 2017 Maybe getElementParent, not sure. Link to comment
mint3d Posted January 28, 2017 Author Share Posted January 28, 2017 Hmm, just tried it. Doesn't seem to be working thanks anyhow. Link to comment
Captain Cody Posted January 28, 2017 Share Posted January 28, 2017 getElementParent returns the parentElement, but you cannot get a variables name. Link to comment
^iiEcoo'x_) Posted January 28, 2017 Share Posted January 28, 2017 local gui = { 'gui-tabpanel', }; for k,v in ipairs ( gui ) do if getElementType(source) == v then Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now