T
trant
I am working on a custom control, an extension of Panel which draws a series
of rectangles in a flow chart. Each rectangle has a title and the ideal
approach would be to allow the user to edit the title by simply clicking it.
Obviously I could hook up a rename dialog to a context menu which would be
easy but it is a bit more tedious to the users so I am hoping I can
accomplish this the ideal way.
Textbox functionality does not look simple though so I'd hate to recreate it
for my control. Yeah handling the keyboard events to show what the user types
is not hard but I am not sure how the flashing cursor would play out (not
talking about the mouse cursor, but the blinking cursor which indicates you
are editing text)
So one thing I was hoping I can do is somehow hijack the textbox's
functionality, like creating a textbox which would be superimposed on the
label which would be editted. Can I do that? I have been trying a few things
but so far no dice.
Even just a broad description of how to do this would be grateful
of rectangles in a flow chart. Each rectangle has a title and the ideal
approach would be to allow the user to edit the title by simply clicking it.
Obviously I could hook up a rename dialog to a context menu which would be
easy but it is a bit more tedious to the users so I am hoping I can
accomplish this the ideal way.
Textbox functionality does not look simple though so I'd hate to recreate it
for my control. Yeah handling the keyboard events to show what the user types
is not hard but I am not sure how the flashing cursor would play out (not
talking about the mouse cursor, but the blinking cursor which indicates you
are editing text)
So one thing I was hoping I can do is somehow hijack the textbox's
functionality, like creating a textbox which would be superimposed on the
label which would be editted. Can I do that? I have been trying a few things
but so far no dice.
Even just a broad description of how to do this would be grateful