There are 4 messages totalling 326 lines in this issue.
Topics of the day:
1. RadioButtons (3)
2. Message icons in forms
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
Date: Sat, 21 Jan 2006 01:20:36 -0500
From: Lee Herbst <lcherbst (AT) GMAIL (DOT) CM>
Subject: Re: RadioButtons
Well, the thing is I want to be able to create a single Visually
inherited radio button that does this on its own. So, I can place any
number of them in a group box and it will work. It seems to me that
the group box must notify the radio buttons of their state change and
I should be able to tap into that event to make my color changes work
without keeping track of each individual button and iterating through
a collection.
1/20/06, Bob Davis <bobdavis (AT) txbi (DOT) netwrote:
Lee,
I was a little quick with the send button. Right idea but carried too far=
Try this:
Private Sub rbToggle1_CheckedChanged(ByVal sender As , ByVal e As
System.EventArgs) Handles rbToggle1.CheckedChanged
If rbToggle1.Checked =3D True Then
rbToggle1.BackColor =3D ColorDown
rbToggle2.BackColor =3D ColorUp
End If
End Sub
Private Sub rbToggle2_CheckedChanged(ByVal sender As , ByVal e As
System.EventArgs) Handles rbToggle2.CheckedChanged
If rbToggle2.Checked =3D True Then
rbToggle2.BackColor =3D ColorDown
rbToggle1.BackColor =3D ColorUp
End If
End Sub
Fri, 20 Jan 2006 Bob Davis wrote:
>
>Lee,
>
>While the group box containing the radio buttons (I making an assumption
>here even knowing how dangerous that can be) handles checking and
>unchecking the various radio buttons within it, the other properties of
>each radio button must be handles explicitely so your code for each radi=
o
>button would become something like this(for radio buttons rbToggle1 and
>rbToggle2):
>
>
>Private Sub rbToggle1_CheckedChanged(ByVal sender As , ByVal e As
>System.EventArgs) Handles rbToggle1.CheckedChanged
If rbToggle1.Checked Then
rbToggle1.BackColor =3D ColorDown
rbToggle2.BackColor =3D ColorUp
Else
rbToggle1.BackColor =3D ColorUp
rbToggle2.BackColor =3D ColorDown
End If
>End Sub
>
>Private Sub rbToggle2_CheckedChanged(ByVal sender As , ByVal e As
>System.EventArgs) Handles rbToggle2.CheckedChanged
If rbToggle2.Checked Then
rbToggle2.BackColor =3D ColorDown
rbToggle1.BackColor =3D ColorUp
Else
rbToggle2.BackColor =3D ColorUp
rbToggle1.BackColor =3D ColorDown
End If
>End Sub
>
>HTH
>
>Bob
>
Fri, 20 Jan 2006 Lee Herbst wrote:
>
>>I am using VB.NET 2003 and I am trying to create an User Control from
>>a RadioButton that changes color based on whether it is checked or
>>not. Now, when you click on the radio button, the color change works,
>>when you click on a different radio button (turning off the previously
>>checked button), the color change does not work. Does anyone know
>>what event causes the radiobutton to become unchecked when another
>>radiobutton is selected? I am currently using the CheckChanged event,
>>but, like I said, it doesn't work. Here is a snippet:
>>
>>
>>Private Sub rbToggle_CheckedChanged(ByVal sender As , ByVal e As
>>System.EventArgs) Handles rbToggle.CheckedChanged
>If rbToggle.Checked Then
>rbToggle.BackColor =3D ColorDown
>Else
>rbToggle.BackColor =3D ColorUp
>End If
>>End Sub
>>
>>
>>
>>Thanks,
>>
>>Lee
>
-
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
-L
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
Date: Sat, 21 Jan 2006 01:29:40 -0500
From: Ivan Cholev <icholev (AT) ABV (DOT) BG>
Subject: Re: RadioButtons
I've I understood you correctly you are trying to create a RadioButton
with extra functionality. If this is the case then you should inherit from
RadioButton class
Inherits
And then
Private Sub UserControl1_CheckedChanged(ByVal sender As , ByVal e As
System.EventArgs) Handles MyBase.CheckedChanged
If Me.Checked Then
Me.BackColor = ColorDown
Else
Me.BackColor = ColorUp
End If
End Sub
In this case all works fine. Thought I tested it on VB.NET 2002 but on
VB.NET 2003 things should be the same
Ivan Cholev,
Fri, 20 Jan 2006 16:42:55 -0500, Lee Herbst <lcherbst (AT) GMAIL (DOT) CMwrote:
>I am using VB.NET 2003 and I am trying to create an User Control from
>a RadioButton that changes color based on whether it is checked or
>not. Now, when you click on the radio button, the color change works,
>when you click on a different radio button (turning off the previously
>checked button), the color change does not work. Does anyone know
>what event causes the radiobutton to become unchecked when another
>radiobutton is selected? I am currently using the CheckChanged event,
>but, like I said, it doesn't work. Here is a snippet:
>
>
>Private Sub rbToggle_CheckedChanged(ByVal sender As , ByVal e As
>System.EventArgs) Handles rbToggle.CheckedChanged
If rbToggle.Checked Then
rbToggle.BackColor = ColorDown
Else
rbToggle.BackColor = ColorUp
End If
>End Sub
>
>
>
>Thanks,
>
>Lee
>
>
>The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
>international's LISTSERV(R) software. For subscription/signoff info
>and archives, see
CPYRIGHT INF:
--
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
Date: Sat, 21 Jan 2006 10:35:00 -0000
From: "Dominio, lda" <dominio.lda (AT) CLIX (DOT) PT>
Subject: Message icons in forms
Hi all,
I want simulate one message box with one form,
how can i load one picture to form with system
'critical message icon' ?
I do not mean icon file external load because the
aspect of system icon changes with system used.
Thanks
Fernando
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
Date: Sat, 21 Jan 2006 12:43:12 -0500
From: Lee Herbst <lcherbst (AT) GMAIL (DOT) CM>
Subject: Re: RadioButtons
Thank you very much. That worked. I'm not sure I understand why this
worked, but when I inherited from UserControl and tried to modify the
behavior of a radio button that I added to my UserControl, it would
not work.
I guess you only want to use UserControl for creating complex user
controls from the base controls and inherit from the specific control
if you want to modify the behavior of a base control.
Any additional insight on why I could not get it to work using
UserControl would be helpful.
Thanks,
Lee
1/21/06, Ivan Cholev <icholev (AT) abv (DOT) bgwrote:
I've I understood you correctly you are trying to create a RadioButton
with extra functionality. If this is the case then you should inherit fro=
m
RadioButton class
Inherits
And then
Private Sub UserControl1_CheckedChanged(ByVal sender As , ByVal e A=
s
System.EventArgs) Handles MyBase.CheckedChanged
If Me.Checked Then
Me.BackColor =3D ColorDown
Else
Me.BackColor =3D ColorUp
End If
End Sub
In this case all works fine. Thought I tested it on VB.NET 2002 but on
VB.NET 2003 things should be the same
Ivan Cholev,
--
Fri, 20 Jan 2006 16:42:55 -0500, Lee Herbst <lcherbst (AT) GMAIL (DOT) CMwrote=
:
>
>I am using VB.NET 2003 and I am trying to create an User Control from
>a RadioButton that changes color based on whether it is checked or
>not. Now, when you click on the radio button, the color change works,
>when you click on a different radio button (turning off the previously
>checked button), the color change does not work. Does anyone know
>what event causes the radiobutton to become unchecked when another
>radiobutton is selected? I am currently using the CheckChanged event,
>but, like I said, it doesn't work. Here is a snippet:
>
>
>Private Sub rbToggle_CheckedChanged(ByVal sender As , ByVal e As
>System.EventArgs) Handles rbToggle.CheckedChanged
If rbToggle.Checked Then
rbToggle.BackColor =3D ColorDown
Else
rbToggle.BackColor =3D ColorUp
End If
>End Sub
>
>
>
>Thanks,
>
>Lee
>
>
--
>The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
>international's LISTSERV(R) software. For subscription/signoff info
>and archives, see
CPYRIGHT INF:
S-L
-
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
-L
The VISBAS-L list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see
CPYRIGHT INF:
End of VISBAS-L Digest - 20 Jan 2006 to 21 Jan 2006 (#2006-21)