Re: Winform inside a SplitContainer Funny Behaviour
- From: "AnikSol" <anisol@xxxxxxxxxxxxxxxx>
- Date: Mon, 16 Oct 2006 00:45:31 +0800
Hello Linda,
Since all the textbox controls on our forms are usercontrol ( inheriting
textboxes to ensure that only numeric values are allowed)
so in the numerictextbox (userocntrol which is inheriting from textbox.) on
mouseclick event, following code was written
Private Sub NumericTextBox_MouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick
Me.SelectionStart() = (e.Location.X) / 6
Me.SelectionLength = 0
End Sub
In the above code, if we used only e.location.x, the cursor was being placed
very far of from click point, so by hit and trial, got the e.location.x/6
Though it is working, but not very sure if this is the right way.
trust you could advise.
regards
"AnikSol" <anisol@xxxxxxxxxxxxxxxx> wrote in message
news:%23GjBTJF8GHA.4084@xxxxxxxxxxxxxxxxxxxxxxx
Hello Linda,
Tried with usercontrol, its ok.
If we create a usercontrol derived from the existing winforms, it just
behaves the way it was before - ie, the cursor can only be added at the
beginning of the text.
But to convert atleast 40 winforms into user controls and change the
coding etc, its going to be a gigantic efforts.
Secondly, my changing the whole application to an MDI also is causing a
few other headaches.
Is there any work around for this ?
regards
"Linda Liu [MSFT]" <v-lliu@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:sOdvgkO7GHA.2336@xxxxxxxxxxxxxxxxxxxxxxxx
Hi AnikSol,
I performed a test based on your description and sample code. I did
reproduce the problem.
As what Stoitcho said, the split container is no more than two panels
docked and separated by a splitter. We could show a form in a Panel or
Group control as well. In this case, the form's behavior is just like
when
it is shown in a split container.
I think this behavior is by design. I recommend you to replace the form
with a user control. I mean you could show a user control in the split
container instead of a form. Then everything will be fine.
Hope this helps.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: Winform inside a SplitContainer Funny Behaviour
- From: Linda Liu [MSFT]
- Re: Winform inside a SplitContainer Funny Behaviour
- References:
- Winform inside a SplitContainer Funny Behaviour
- From: AnikSol
- Re: Winform inside a SplitContainer Funny Behaviour
- From: AnikSol
- Re: Winform inside a SplitContainer Funny Behaviour
- From: Linda Liu [MSFT]
- Re: Winform inside a SplitContainer Funny Behaviour
- From: AnikSol
- Winform inside a SplitContainer Funny Behaviour
- Prev by Date: Databinding and Bindingsource issue
- Next by Date: Use of Form.Owner property without the the owned forms always on top
- Previous by thread: Re: Winform inside a SplitContainer Funny Behaviour
- Next by thread: Re: Winform inside a SplitContainer Funny Behaviour
- Index(es):
Relevant Pages
|