.net - Show a form confined within a tabpage -


we have usercontrols (that each have own presenter). each 1 lives within tabpage on main form.

one of them has graphical display of objects can interact with. when actions taken need collect information user, pop form (you call dialog). we'd form visible within tab page, can flip tab check information , come back, etc.

we tried setting .toplevel = false on form, causes weird behavior that's unacceptable. various typical solutions (use mdi, no border on form, etc...) don't work in our circumstance.

are there other ways can achieve desired behavior?

your question reminded me of solution similar problem in wpf. let me best explain problem , solution.

the problem provide method business logic interact user through "interaction requests" handled in appropriate region of user interface. business logic unaware of ui involved in interaction, initiate request event handled ui. couldn't find example again , wpf centric anyway, handled creating control mimic'd of modal dialog. created action handled interaction event , automatically inserted faux dialog tabpage on top of other controls in tabpage. 1 trick action assumed faux dialog inserted grid control parent.

so here's i'm saying... possible solution

  1. create usercontrol looks modal dialog. except contained in transparent region fill container.
  2. have inserted tabpage's collection of controls on top of other controls. dock fill tabpage.

actually, here's pictures..

tab page without dialog

and when add user control.. have fake dialog has transparent area around fills tab page..

fake dialog

the idea here not able interact controls below it, because on top, still inside tab page, doesn't affect interacting other tabs. blue portion of 2nd image should transparent give illusion doesn't exist, prevent interacting controls below it.

this has limitations though because cannot make dialog larger tab page.

i guess maybe i'm suggesting think "inside box" ?


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -