Hi,
The title of this topic might be somewhat misleading, or too broad, so bare with me while I try to explain.
I am working on a plugin containing many custom gadgets. Instead of creating a iCustomGui
for each of these I figured out it would be easier to simply create a single GeUserArea
and handle all drawing, hit testing, selections, etc ...
Main reason for this decision has also to do with the fact that I very much need to support drag and drop. And with only a single userarea to deal with, that would be perfect, as I then do not have to worry when user might accidentally drop an item between the gadgets, in case these would be separate iCustomGuis.
The main problem with this single userarea, however, is that I need a few EditText fields. Right between all the other custom gadgets.
As far as I can tell there is no way of "superimposing" an actual EditText gadget onto a GeUserArea.
So far, I have brainstormed three solutions:
- Use a single userarea with a predefined area, in order to draw a dummy EditText box containing the input text. When user clicks in this area a new dialog is shown containing an actual EditText, with OK and Cancel buttons.
- Same as above, but have an EditText located below in the dialog below the userarea. When user selects the predefined area, the focus is set to the EditText below. The "dummy" predefined edittext in the userarea would then be updated as the user edits the EditText input.
- Provide a fully functional edittext area inside the userarea, handling all keyboard inputs, cursor navigation.
Solution 3 is the least desired as this would require quite some work.
I am not too happy about solution 1, as this involves an extra dialog, and requires the user to close this when finished entering text (via OK button, or any other means).
So, obviously, solution 2 seems to be the way to go. But maybe there is/are other solutions(s) I didn't think of?