Hello,
Hello,
I developed a UserControl. It has funny behavior. It is composed of three
controls. A texbox, a combobox and a button. There are three properties to
indicate the visibility of the three controls. The only property which
functions well is the one for the button. The two others, even if I do:
UserControl.Tex tboxVisible = True or UserControl.Com boboxVisible = True, the
textbox or the combobox remain invisible. I placed a BreakPoint on the Set
of the TextboxVisible property. The code look like that: TexBox.Visible =
Value. Even if Value is set to True the Visible property of the Textbox does
not change as if it were in readonly. Did somebody already had this problem?
It is not the first usercontrol that I make but it is the first time that I
have this kind of problem.
Any solution ?
Thanks
--
Marc R.
E-mail
Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}",
"mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
--
Marc R.
E-mail
Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}",
"mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a") 6 9150
Marc,
Why don't you just test with visible = false instead of visible = value
At least does it give us more information that the value is not wrong.
Just my thought,
Cor
I tried this
Texbox.Visible = False
Texbox.Visible = True
that doesn't make any difference Visible property remain to false... I even
tried this
If Value Then
Texbox.Visible = True
Else
Texbox.Visible = False
End If
Same result
Any Idea?
--
Marc R.
E-mail
Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}",
"mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
"Cor Ligthert [MVP]" <no************ @planet.nl> a écrit dans le message de
news: uD************* *@TK2MSFTNGP09. phx.gbl... Marc,
Why don't you just test with visible = false instead of visible = value
At least does it give us more information that the value is not wrong.
Just my thought,
Cor
I enven set a breakpoint in the Set of my Visible property and add a spy on
my textbox.visible property. In the spy window, we can change the values in
break mode. When I try to change the Visible property to True, it doesn't
change. False remain...
I am a little bit despaired :-(
--
Marc R.
E-mail
Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}",
"mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
"Marc Robitaille" <ma************ *@ars-solutions.caa> a écrit dans le
message de news: eq************* *@TK2MSFTNGP09. phx.gbl... I tried this Texbox.Visible = False Texbox.Visible = True that doesn't make any difference Visible property remain to false... I even tried this
If Value Then Texbox.Visible = True Else Texbox.Visible = False End If
Same result
Any Idea?
-- Marc R. E-mail Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}", "mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
"Cor Ligthert [MVP]" <no************ @planet.nl> a écrit dans le message de news: uD************* *@TK2MSFTNGP09. phx.gbl... Marc,
Why don't you just test with visible = false instead of visible = value
At least does it give us more information that the value is not wrong.
Just my thought,
Cor
Marc,
I have not any problem
\\\ You can just open a form and than past this in after the #region (be
aware of ' that last End Class what I have deleted for this purpose)
Private mc As New mycontrol
Private Sub Form1_Load(ByVa l sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Me.Controls.Add (mc)
AddHandler mc.but.Click, AddressOf btclick
End Sub
Private Sub btclick(ByVal sender As _
System.Object, ByVal e As System.EventArg s)
If mc.tb.Visible = True Then
mc.tb.Visible = False
Else
mc.tb.Visible = True
End If
End Sub
End Class
Public Class mycontrol
Inherits GroupBox
Public but As New Button
Public tb As New TextBox
Public Sub New()
Me.Height = 70
Me.Width = 130
tb.Text = "Hello World"
but.Location = New System.Drawing. Point(20, 10)
tb.Location = New System.Drawing. Point(10, 40)
Me.Controls.Add (but)
Me.Controls.Add (tb)
End Sub
///
I hope this helps,
Cor
"Marc Robitaille" <ma************ *@ars-solutions.caa> schreef in bericht
news:eq******** ******@TK2MSFTN GP09.phx.gbl... I tried this Texbox.Visible = False Texbox.Visible = True that doesn't make any difference Visible property remain to false... I even tried this
If Value Then Texbox.Visible = True Else Texbox.Visible = False End If
Same result
Any Idea?
-- Marc R. E-mail Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}", "mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
"Cor Ligthert [MVP]" <no************ @planet.nl> a écrit dans le message de news: uD************* *@TK2MSFTNGP09. phx.gbl... Marc,
Why don't you just test with visible = false instead of visible = value
At least does it give us more information that the value is not wrong.
Just my thought,
Cor
Are these controls in a container control, such as a panel?
"Marc Robitaille" <ma************ *@ars-solutions.caa> wrote in message
news:uJ******** ******@TK2MSFTN GP10.phx.gbl... Hello,
Hello,
I developed a UserControl. It has funny behavior. It is composed of three controls. A texbox, a combobox and a button. There are three properties to indicate the visibility of the three controls. The only property which functions well is the one for the button. The two others, even if I do: UserControl.Tex tboxVisible = True or UserControl.Com boboxVisible = True, the textbox or the combobox remain invisible. I placed a BreakPoint on the Set of the TextboxVisible property. The code look like that: TexBox.Visible = Value. Even if Value is set to True the Visible property of the Textbox does not change as if it were in readonly. Did somebody already had this problem? It is not the first usercontrol that I make but it is the first time that I have this kind of problem.
Any solution ? Thanks
-- Marc R. E-mail Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}", "mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
-- Marc R. E-mail Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}", "mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
Thank you. I tested your code in a new form and it works perfectly. But,
that did not solved my problem. I have circumvent the problem in this way.
Private mblnVisibleComb o As Boolean
Set(ByVal Value As Boolean)
mblnVisibleComb o = Value
Combobox.Visibl e = mblnVisibleComb o
End Set
instead of
Set(ByVal Value As Boolean)
Combobox.Visibl e = Value
End Set
Has you can see, it is very strange but it works now!!!!
Thank you
--
Marc R.
E-mail
Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}",
"mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
"Cor Ligthert [MVP]" <no************ @planet.nl> a écrit dans le message de
news: %2************* ***@TK2MSFTNGP1 4.phx.gbl... Marc,
I have not any problem
\\\ You can just open a form and than past this in after the #region (be aware of ' that last End Class what I have deleted for this purpose) Private mc As New mycontrol Private Sub Form1_Load(ByVa l sender As System.Object, _ ByVal e As System.EventArg s) Handles MyBase.Load Me.Controls.Add (mc) AddHandler mc.but.Click, AddressOf btclick End Sub Private Sub btclick(ByVal sender As _ System.Object, ByVal e As System.EventArg s) If mc.tb.Visible = True Then mc.tb.Visible = False Else mc.tb.Visible = True End If End Sub End Class Public Class mycontrol Inherits GroupBox Public but As New Button Public tb As New TextBox Public Sub New() Me.Height = 70 Me.Width = 130 tb.Text = "Hello World" but.Location = New System.Drawing. Point(20, 10) tb.Location = New System.Drawing. Point(10, 40) Me.Controls.Add (but) Me.Controls.Add (tb) End Sub /// I hope this helps,
Cor
"Marc Robitaille" <ma************ *@ars-solutions.caa> schreef in bericht news:eq******** ******@TK2MSFTN GP09.phx.gbl...I tried this Texbox.Visible = False Texbox.Visible = True that doesn't make any difference Visible property remain to false... I even tried this
If Value Then Texbox.Visible = True Else Texbox.Visible = False End If
Same result
Any Idea?
-- Marc R. E-mail Dim strAddr As String =Convert.ToStri ng(String.Forma t("{0}.{2}@{3}. {1}", "mxrc", "cx", "robitxille ", "xrs-solutions")).Re place("x", "a")
"Cor Ligthert [MVP]" <no************ @planet.nl> a écrit dans le message de news: uD************* *@TK2MSFTNGP09. phx.gbl... Marc,
Why don't you just test with visible = false instead of visible = value
At least does it give us more information that the value is not wrong.
Just my thought,
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John South |
last post by:
Hi
I'm new to asp.net and c# and I've got stuck on an apparently simple
problem:
I'm trying to make a HyperLink dynamically visible/invisible.
This is the HTML:
<asp:HyperLink Runat="server" Text="Back"
|
by: Andy G |
last post by:
I am tring to loop through a dataset to find records that exist. If the
record exists then make the corresponding image visible. So I try to take
the row value and concatenate it onto a string ("imgSession"), so the
resulting control ID name will be imgSessionX. Where X could be a number
corresponding to the ID of the image. I need help with the logic.
Dim row As DataRow
Dim myImage As Image
|
by: mike |
last post by:
Hi,
I'd like advice from a .NETer. I have a loadcombo
routine which sets the selectedindex to -1 if it's an "add
record", but then it goes to a security routine which,
based on permissions sets the visible property. When the
visible property is set..
'Petition Type
lblPetitionType.Visible = False
|
by: Lucvdv |
last post by:
Can anyone explain why this happens with the code at the bottom?
It looked like a thread safety issue, but changing the declaration of
Label1 to Shared doesn't help.
Standard windows form; one label, two buttons.
- if Label1.Visible is set to True in the form designer, everything
works as expected. Button1 toggles the label visibility, and Button2
|
by: Keithb |
last post by:
I need to hide a GridView's "edit" column if the user's role does not
support editing. However, the column's Visible property does not support
databinding. Is there a workaround?
Thanks,
Keith
| |
by: landesjoe |
last post by:
Hi,
here's my problem in short: Text boxes in gridview don't seem to hold
their value if the column's .Visible property is changed back and
forth.
I've got a form with a gridview populated from a data view (which in
turn is loaded from a manually setup DataTable for testing purposes).
One of the columns in the grid is a checkbox that's tied to an event
handler that'll change the .Visible property of a column with a text
box. That text...
|
by: Doogie |
last post by:
Hi,
I am trying to access the visible property of an ASP button inside
javascript to no avail. Here's what my button control looks like:
<asp:Button id="btnAcceptTrips" name="btnAcceptTrips" runat="server"
Text="Accept Trips" Visible="False">
Here's my test method:
function test(checkbox)
|
by: Doc John |
last post by:
I have an MDI container with a child Form which will be visible according to
certain events. The problem is that when I set the property Visible to False
and then back to True, the Form will be in another location, or it will be
maximized.
Why does the child Form change its location when the Visible propery is set
true (after being set to False)? Why doesn't it stay with the same Size and
the same Location?
Thanks.
|
by: =?Utf-8?B?VGVycnk=?= |
last post by:
Hi,
I have a couple of labels on a form and their visible property is bound
to boolean properties on a custom object. When I first load the form, all
works as it should. This form is 'tied' together with a search form, and the
user can go back and forth. When the user hits ok, the form is hidden and
the search form is shown and visa-versa. The problem is that when the form
is hidden when the labels visible property is False, and then...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |