Hey, i try to set focus on DTextEntry with RequestFocus(), but it seems to have no effect. I'm not using MakePopup() because it kinda ruins my VGUI. Pls halp :D
I have investigated this at length and can't seem to give a DTextEntry keyboard focus. I guess you could try using MakePopup and then fix all of the things it does (I think it separates the panel from everything else, so just reparent it and it should be fine).
Yeah, there is no way (that i have tried) to requestfocus on it without doing MakePopup on it, how would it ruin your vgui anyway?
[QUOTE=commander204;23059930]Probably, [b][url=http://wiki.garrysmod.com/?title=Panel.SetKeyboardInputEnabled]Panel.SetKeyboardInputEnabled [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b][/QUOTE]
Tried that, it has no effect.
Sorry for bumping an ancient thread but this is a problem that I've had myself many times and the solution to which is fairly obscure to a non-experienced coder or someone who hasn't encountered the problem them-self.
After spending a few hours reading the vgui panel code etc it seems that for a DTextEntry to work it must have at least one parent that is derived from the base class "EditablePanel".
DFrame seems to be the only panel that is derived from this class so, in short, any time you want to use a DTextEntry you must have a DFrame that it is parented to or that its parents are parented to.
I hope this is useful to anyone else who has, like myself, encountered this issue and been completely unable to find helpful documentation.
Once again sorry for bumping but I think it's better to post this missing piece of documentation as a reply to a question rather than creating a thread for it + when searching for a solution to this problem this was one of the few results that came up so it seems reasonable that this should be useful for others searching for a solution.
Sorry, you need to Log In to post a reply to this thread.