c# mixing Graphics and TextBox
c# mixing Graphics and TextBox
I have developed an interface in which the user can design his own GUI. Problem being that I have to put on same custom control both graphic objects and textbox for input data. What happen is that I use the _Paint event of the custom control to refresh the graphics but all textboxes seems to be lost so I have to refresh them along with the graphic objects. This makes the refresh in case of resize very ugly.
I have chosen to display the graphics objects as a bmp in the BackgroundPicture
while textboxes are added with and Control.Add().
My goal was to avoid refreshing the graphic objects if not needed and keep the textboxes on the control.
Question: what is the best way to mix graphic objects and textboxes on same custom control in C#?
Thanks!!!
Provide a Minimal, Complete, and Verifiable example. Also, you don't even state what GUI Toolkit you are using. This seems like Winforms but could be another exotic toolkit aswell...
– Freggar
Jul 3 at 6:49
please...check the question...I am not asking how to fix the code but rather about the best way to do something. It could be either by using System.Draw+Grphics or with some other tool. It is an open question for a specific problem.
– Nicola Dell'anna
Jul 3 at 7:06
Your question is much more unclear than you probably think. The term 'mixing' is totally confusing. Is it really about graphics and textboxes or is it about layout and fluent design? What does all textboxes seems to be lost even mean? - And you still haven't added the proper Tag, probably Winforms, so one can see it on the questions page. So, you see, quite a lot of reasons for even more downvotes..? - Here an image or two might actually be the best way to improve the question.
– TaW
Jul 3 at 9:44
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Why down voted?
– Nicola Dell'anna
Jul 3 at 6:44