473,395 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

IsMirrored property - what is this?

dgk
I'm searching for a way to determine if control values have changed.
For some it's easy, such as TextBox.Modified. But looking at the
radiobutton I come across IsMirrored. Curious, I look to the help. Not
very helpful. So I look to the newsgroup. Not mentioned. So now I ask.
What does the IsMirrored property tell me?
Nov 23 '05 #1
10 4133
dgk,
Using the Index in Help for IsMirrored, leads you to:

http://msdn2.microsoft.com/en-us/lib...smirrored.aspx

Which isn't that helpful, however searching Google for "mirrored controls",
leads you to:

http://msdn2.microsoft.com/en-us/lib...smirrored.aspx

Which I find significantly more helpful.

I would say in short "IsMirrored" tells you if the Control is mirrored (as
if you placed it on the edge of a mirror) Right to Left as opposed to the
normal Left to Right.

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
<dg*@somewhere.com> wrote in message
news:af********************************@4ax.com...
| I'm searching for a way to determine if control values have changed.
| For some it's easy, such as TextBox.Modified. But looking at the
| radiobutton I come across IsMirrored. Curious, I look to the help. Not
| very helpful. So I look to the newsgroup. Not mentioned. So now I ask.
| What does the IsMirrored property tell me?
Nov 23 '05 #2
Jay,
http://msdn2.microsoft.com/en-us/lib...smirrored.aspx

Which isn't that helpful, however searching Google for "mirrored controls",
leads you to:

http://msdn2.microsoft.com/en-us/lib...smirrored.aspx

Which I find significantly more helpful.

The second link looks a lot like the first one ;-)
Mattias
Nov 23 '05 #3
Jay,

I hate to tell this, however I had the same expirience as Mattias.

However expecting what your answer would be I found this link, which shows
it very nice.

http://www.microsoft.com/middleeast/msdn/mirror.aspx

:-)

Cor
Nov 23 '05 #4
Doh!

This is the link I meant:

http://www.microsoft.com/middleeast/msdn/mirror.aspx

(which oddly enough was the second link on the Google search page).

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ur**************@TK2MSFTNGP09.phx.gbl...
| Jay,
|
|
http://msdn2.microsoft.com/en-us/lib...smirrored.aspx | >
| >Which isn't that helpful, however searching Google for "mirrored
controls",
| >leads you to:
| >
|http://msdn2.microsoft.com/en-us/lib...smirrored.aspx

| >
| >Which I find significantly more helpful.
|
|
| The second link looks a lot like the first one ;-)
|
|
| Mattias
Nov 23 '05 #5
dgk
On Tue, 22 Nov 2005 09:49:50 -0600, "Jay B. Harlow [MVP - Outlook]"
<Ja************@tsbradley.net> wrote:
Doh!

This is the link I meant:

http://www.microsoft.com/middleeast/msdn/mirror.aspx

(which oddly enough was the second link on the Google search page).


Oh, very good stuff. Not really applicable to what I was looking for
in the first place, but fun for a demo.
Nov 27 '05 #6
Dgk,
I was answering the "What does the IsMirrored property tell me?" question.

It appears that your "I'm searching for a way to determine if control values
have changed." question remains unanswered.

Are you asking for any property in general, or a specific property, such as
Text?

I normally handle the TextBox.TextChanged event to determine when the Text
property changed. There are similarly named events for their respective
properties. SizeChanged event for the Size property, TabIndexChanged event
for the TabIndex property and so on. A lot of the properties/event pairs are
actually inherited from Control.

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"dgk" <No*****@MailsAnonymous.com> wrote in message
news:63********************************@4ax.com...
| On Tue, 22 Nov 2005 09:49:50 -0600, "Jay B. Harlow [MVP - Outlook]"
| <Ja************@tsbradley.net> wrote:
|
| >Doh!
| >
| >This is the link I meant:
| >
| >http://www.microsoft.com/middleeast/msdn/mirror.aspx
| >
| >(which oddly enough was the second link on the Google search page).
|
| Oh, very good stuff. Not really applicable to what I was looking for
| in the first place, but fun for a demo.
Nov 28 '05 #7
dgk
On Mon, 28 Nov 2005 08:56:34 -0600, "Jay B. Harlow [MVP - Outlook]"
<Ja************@tsbradley.net> wrote:
Dgk,
I was answering the "What does the IsMirrored property tell me?" question.

It appears that your "I'm searching for a way to determine if control values
have changed." question remains unanswered.

Are you asking for any property in general, or a specific property, such as
Text?

I normally handle the TextBox.TextChanged event to determine when the Text
property changed. There are similarly named events for their respective
properties. SizeChanged event for the Size property, TabIndexChanged event
for the TabIndex property and so on. A lot of the properties/event pairs are
actually inherited from Control.

Essentially I'm trying to show a "Are you sure you want to discard
your changes" type dialog if someone hits the cancel button after
editing some data. I looked back in the newsgroup history and found a
few good ideas, such as adding handlers to radio buttons so that as
changes occur they set a boolean flag. I'm also recursively running
through the form and containers on the form looking for controls that
will tell me that they were edited.

I'm not doing overkill here. If someone changes a value and then
changes it back, that is still going to set the flag that something
changed. Sort of sloppy I know but I'm under some time pressure here.
Ha, who isn't?

All these values are coming out of an object and going back into that
object, so I suppose that I can do a copy of the object before editing
and then load everything into another object and compare. I'm pretty
sure that comparing the objects will just tell me whether the
variables are pointing to the same object.

I need to understand deep copy and shallow copy a bit better. Most of
the object is pretty straight forward but there are a few collections
in there. Actually they are generic lists. Do you know if a generic
list is duplicated by a shallow copy or do I do a deep copy to get
separate instances?

Very odd. I just tried it on my object and I don't seem to have Copy,
Clone, or anything like that. Oh, ok. I need to use memberwiseclone or
something like that but it's protected. Rats. So I guess I have to
implement my own code for this?

Ah. Well, I look forward to any hints. So much to learn, so little
time.
Nov 29 '05 #8
dgk,
| All these values are coming out of an object and going back into that
| object,
Oh! in the case where you have an "object" I would ask the object if any of
its values changed.

In my Property Set methods on my object I call a protected "SetDirty" method
that sets a boolean flag that indicates if the object is dirty. My "object"
then has a public readonly IsDirty property that the UI can use to decide if
its dirty or not. When an object is loaded or saved, the boolean flag is
cleared to indicate that the object itself is not dirty. Generally SetDirty,
IsDirty, and the boolean flag are part of a common base class.

| Essentially I'm trying to show a "Are you sure you want to discard
| your changes" type dialog if someone hits the cancel button after
....
| So I guess I have to
| implement my own code for this?
I would consider implementing a "Clone" method that returns a "copy" of the
current object, this method would use MemberwiseClone if a shallow copy was
acceptable, otherwise it would do a deep copy. Be careful on deep copies &
object hierarchies.

Alternatively I would consider having 2 fields for each property of my
"object", a current value & an original value. The "object" would have a
"Revert" method that would restore the current values to the "original"
values. When I load the object I would set both fields to the same value.
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"dgk" <No*****@MailsAnonymous.com> wrote in message
news:v2********************************@4ax.com...
| On Mon, 28 Nov 2005 08:56:34 -0600, "Jay B. Harlow [MVP - Outlook]"
| <Ja************@tsbradley.net> wrote:
|
| >Dgk,
| >I was answering the "What does the IsMirrored property tell me?"
question.
| >
| >It appears that your "I'm searching for a way to determine if control
values
| >have changed." question remains unanswered.
| >
| >Are you asking for any property in general, or a specific property, such
as
| >Text?
| >
| >I normally handle the TextBox.TextChanged event to determine when the
Text
| >property changed. There are similarly named events for their respective
| >properties. SizeChanged event for the Size property, TabIndexChanged
event
| >for the TabIndex property and so on. A lot of the properties/event pairs
are
| >actually inherited from Control.
|
|
| Essentially I'm trying to show a "Are you sure you want to discard
| your changes" type dialog if someone hits the cancel button after
| editing some data. I looked back in the newsgroup history and found a
| few good ideas, such as adding handlers to radio buttons so that as
| changes occur they set a boolean flag. I'm also recursively running
| through the form and containers on the form looking for controls that
| will tell me that they were edited.
|
| I'm not doing overkill here. If someone changes a value and then
| changes it back, that is still going to set the flag that something
| changed. Sort of sloppy I know but I'm under some time pressure here.
| Ha, who isn't?
|
| All these values are coming out of an object and going back into that
| object, so I suppose that I can do a copy of the object before editing
| and then load everything into another object and compare. I'm pretty
| sure that comparing the objects will just tell me whether the
| variables are pointing to the same object.
|
| I need to understand deep copy and shallow copy a bit better. Most of
| the object is pretty straight forward but there are a few collections
| in there. Actually they are generic lists. Do you know if a generic
| list is duplicated by a shallow copy or do I do a deep copy to get
| separate instances?
|
| Very odd. I just tried it on my object and I don't seem to have Copy,
| Clone, or anything like that. Oh, ok. I need to use memberwiseclone or
| something like that but it's protected. Rats. So I guess I have to
| implement my own code for this?
|
| Ah. Well, I look forward to any hints. So much to learn, so little
| time.
Nov 29 '05 #9
dgk
On Mon, 28 Nov 2005 20:48:39 -0600, "Jay B. Harlow [MVP - Outlook]"
<Ja************@tsbradley.net> wrote:
dgk,
| All these values are coming out of an object and going back into that
| object,
Oh! in the case where you have an "object" I would ask the object if any of
its values changed.

In my Property Set methods on my object I call a protected "SetDirty" method
that sets a boolean flag that indicates if the object is dirty. My "object"
then has a public readonly IsDirty property that the UI can use to decide if
its dirty or not. When an object is loaded or saved, the boolean flag is
cleared to indicate that the object itself is not dirty. Generally SetDirty,
IsDirty, and the boolean flag are part of a common base class.

| Essentially I'm trying to show a "Are you sure you want to discard
| your changes" type dialog if someone hits the cancel button after
...
| So I guess I have to
| implement my own code for this?
I would consider implementing a "Clone" method that returns a "copy" of the
current object, this method would use MemberwiseClone if a shallow copy was
acceptable, otherwise it would do a deep copy. Be careful on deep copies &
object hierarchies.

Alternatively I would consider having 2 fields for each property of my
"object", a current value & an original value. The "object" would have a
"Revert" method that would restore the current values to the "original"
values. When I load the object I would set both fields to the same value.


But I'm planning on updating all the properties, whether they've
changed or not, which means that prior to calling SetDirty from each
property I should check to see if the Set is actually changing the
private value. Pain. I have a LOT of properties - hmm, this should
have been part of the Property snippet. Now I have to learn to edit
snippets.

Actually I already implemented something like this which I borrowed
from an example that I saw. It actually uses a DataRowState object to
track the changes which is neat because I can also store the fact that
it is new if that is the case.

Ok, here's another idea. Someone MUST have done this already. I write
a public method in the object that accepts another object instance as
a parameter and then uses reflection to determine all of its
properties and compares the output of the Get from each one to
determine if the objects are identical. Did I just duplicate some
functionality that already exists? I hate when I do that.
Nov 29 '05 #10
Dgk,
Ok, here's another idea. Someone MUST have done this already. I write
a public method in the object that accepts another object instance as
a parameter and then uses reflection to determine all of its
properties and compares the output of the Get from each one to
determine if the objects are identical. Did I just duplicate some
functionality that already exists? I hate when I do that. Implementing Equals or Compare via reflection is easy enough I don't know if
I would be concerned with duplicating other peoples work, as its a good
learning experience. Whether or not I used it would depend on performance &
behavior ramifications. For equals behavior shouldn't matter, however for
comparing behavior could be affected as you cannot control the sequence of
the comparisons (there is no guarantee on the order that the properties are
returned).

The method created however would/could be the basis for IEquatable(Of T) &
IComparable(Of T) in VS 2005 (Overrides System.Equals & IComparable in VS
2002 & 2003).

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
<dg*@somewhere.com> wrote in message
news:17********************************@4ax.com... On Mon, 28 Nov 2005 20:48:39 -0600, "Jay B. Harlow [MVP - Outlook]"
<Ja************@tsbradley.net> wrote:
dgk,
| All these values are coming out of an object and going back into that
| object,
Oh! in the case where you have an "object" I would ask the object if any
of
its values changed.

In my Property Set methods on my object I call a protected "SetDirty"
method
that sets a boolean flag that indicates if the object is dirty. My
"object"
then has a public readonly IsDirty property that the UI can use to decide
if
its dirty or not. When an object is loaded or saved, the boolean flag is
cleared to indicate that the object itself is not dirty. Generally
SetDirty,
IsDirty, and the boolean flag are part of a common base class.

| Essentially I'm trying to show a "Are you sure you want to discard
| your changes" type dialog if someone hits the cancel button after
...
| So I guess I have to
| implement my own code for this?
I would consider implementing a "Clone" method that returns a "copy" of
the
current object, this method would use MemberwiseClone if a shallow copy
was
acceptable, otherwise it would do a deep copy. Be careful on deep copies &
object hierarchies.

Alternatively I would consider having 2 fields for each property of my
"object", a current value & an original value. The "object" would have a
"Revert" method that would restore the current values to the "original"
values. When I load the object I would set both fields to the same value.


But I'm planning on updating all the properties, whether they've
changed or not, which means that prior to calling SetDirty from each
property I should check to see if the Set is actually changing the
private value. Pain. I have a LOT of properties - hmm, this should
have been part of the Property snippet. Now I have to learn to edit
snippets.

Actually I already implemented something like this which I borrowed
from an example that I saw. It actually uses a DataRowState object to
track the changes which is neat because I can also store the fact that
it is new if that is the case.

Ok, here's another idea. Someone MUST have done this already. I write
a public method in the object that accepts another object instance as
a parameter and then uses reflection to determine all of its
properties and compares the output of the Get from each one to
determine if the objects are identical. Did I just duplicate some
functionality that already exists? I hate when I do that.

Nov 29 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: D Witherspoon | last post by:
I have a Structure I have created and am using it as a Public Property of a class. Here is the property. ------------------------------------------------------ Dim _MyID As SInteger Public...
18
by: Robin Becker | last post by:
Is there a way to override a data property in the instance? Do I need to create another class with the property changed? -- Robin Becker
3
by: Johnny M | last post by:
using Access 2003 Pardon the subject line, but I don't have a better word for this strange behavior (or behavior I don't understand!!!) I have a class module named DepreciationFactor. One of...
4
by: funVB2005fun | last post by:
I am not quite sure what I am getting into but I would like to have a loop that read from a flat file to create some public properties in a class. I am going after this to try and create more...
3
by: Meelis | last post by:
Hi Can one property have different types? For example, i need to property type to be dependend on second property. Pirvate MyValue as Object Private MyType as Integer Public Property...
0
by: doubts | last post by:
Hi, I have a query regarding reading Image Property for button from a XML file . I read XML files to Generate Screens using System.Windows.Forms.Controls .The XML file is read and properties...
1
by: doubts | last post by:
Hi, I have a query regarding reading Image Property for button from a XML file . I read XML files to Generate Screens using System.Windows.Forms.Controls .The XML file is read and properties...
5
by: ronlahav | last post by:
Dear all i Wonder how can i edit a node property (in C# not by hand :) ) i have the follwing XMl file (hibernate.cfg.xml) <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration ...
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.