473,667 Members | 2,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

control won't "hide"

I have a page where I have 3 combo boxes listed in a column. sort of like:

combo1
combo2
combo3

Based on which one is clicked, the others are supposed to hide (i.e.
combobox.visibl e = false).

However, when I have the bottom one in that column to be the one to be used
(selectedindex > 0) even if I set the visible property to be false, the
combo box will show. In this case, I'm trying to hide combo2 from view,
after selecting an item from combo3.

It doesn't show the data in it, it's just an empty combo box that's in the
middle.

The onclick of the controls displays a datagrid, and I have the following in
the bindgrid sub just to confirm:

dim q as boolean
q = cmbbox.visible and it returns false, yet the empty combobox still shows.

Can you hide the combo boxes like this?

I believe the combo boxes are unhidden at page load, but do not know if I
need to hide them at first, and then unhide them as I display stuff in them.
However, this "hide" of the middle box is based on a selectedindexch anged
event on the bottom combo box.

Any help appreciated.

SC

Nov 18 '05 #1
2 2211
Never mind -

I found the problem.

There was a control exactly behind the one I could not apparently get to
hide. It had to get there by mistake.
SC
<me@privacy.net > wrote in message
news:ui******** ******@TK2MSFTN GP09.phx.gbl...
I have a page where I have 3 combo boxes listed in a column. sort of like:
combo1
combo2
combo3

Based on which one is clicked, the others are supposed to hide (i.e.
combobox.visibl e = false).

However, when I have the bottom one in that column to be the one to be used (selectedindex > 0) even if I set the visible property to be false, the
combo box will show. In this case, I'm trying to hide combo2 from view,
after selecting an item from combo3.

It doesn't show the data in it, it's just an empty combo box that's in the
middle.

The onclick of the controls displays a datagrid, and I have the following in the bindgrid sub just to confirm:

dim q as boolean
q = cmbbox.visible and it returns false, yet the empty combobox still shows.
Can you hide the combo boxes like this?

I believe the combo boxes are unhidden at page load, but do not know if I
need to hide them at first, and then unhide them as I display stuff in them. However, this "hide" of the middle box is based on a selectedindexch anged
event on the bottom combo box.

Any help appreciated.

SC

Nov 18 '05 #2
Thanks for the response.

I was doing exactly what you had suggested, and couldn't get the mystery box
to hide. I had to move stuff around on the page, and it was at that point
that I found a control hiding behind the other one.

Sometimes I am my own worst enemy.

SC
"Bin Song, MCP" <an*******@disc ussions.microso ft.com> wrote in message
news:D4******** *************** ***********@mic rosoft.com...
There are 2 ways to do this.
1. Using server side that you are doing now. However, the combo2 will only hide after a postback, which you can achieve by set autopostback of combo3
to true. 2. Using client side javascript, which doesn't need a trip to server:
<script language="Javas cript" for="combo3" event="onchange ">
{
window.document .all.combo2.sty le.display = "none";
or window.document .all.combo2.sty le.visibility = "hidden";
}
</script>

Bin Song, MCP

----- me@privacy.net wrote: -----

I have a page where I have 3 combo boxes listed in a column. sort of like:
combo1
combo2
combo3

Based on which one is clicked, the others are supposed to hide (i.e.
combobox.visibl e = false).

However, when I have the bottom one in that column to be the one to be used (selectedindex > 0) even if I set the visible property to be false, the combo box will show. In this case, I'm trying to hide combo2 from view, after selecting an item from combo3.

It doesn't show the data in it, it's just an empty combo box that's in the middle.

The onclick of the controls displays a datagrid, and I have the following in the bindgrid sub just to confirm:

dim q as boolean
q = cmbbox.visible and it returns false, yet the empty combobox still shows.
Can you hide the combo boxes like this?

I believe the combo boxes are unhidden at page load, but do not know if I need to hide them at first, and then unhide them as I display stuff in them. However, this "hide" of the middle box is based on a selectedindexch anged event on the bottom combo box.

Any help appreciated.

SC

Nov 18 '05 #3

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

Similar topics

3
23036
by: ASGMikeG | last post by:
Hi, I'm upgrading an application from VB6 to .NET. It used tab controls in VB6 to achieve a tab dialogue / wizard type effect - navigating from one tab to the next as the user filled in information. When this has upgraded to .NET the user can suddenly click on the other tabs without having completed the previous tabs i.e. the other tabs are not disabled - only the controls on them are. How do I disable and/or hide a tab page so that...
1
4233
by: Marc Scheuner [MVP ADSI] | last post by:
Folks, I've created a descendant of ListView, and I would like to be able to tell it to "hide" two of the base class's properties - how can I accomplish this? I know I can add a attribute to the properties to remove them from the object inspector window - that's not all, though - I'd like to make them unavailable from code, too.
2
227
by: | last post by:
I have a page where I have 3 combo boxes listed in a column. sort of like: combo1 combo2 combo3 Based on which one is clicked, the others are supposed to hide (i.e. combobox.visible = false). However, when I have the bottom one in that column to be the one to be used
4
9713
by: lcifers | last post by:
Is there a way, through VB.NET, to determine if the user has selected this option? I am writing an application that does some string functions to rename files, and the file names get chopped up if the expected extension is not returned. I can write another function to get around this, but if there is a clean way to determine the state of that toggle I would rather do that. I may need this again in the future and don't want to always...
3
1835
by: jerry.ranch | last post by:
I'm building my own crosstab table. If a crosstab field has no data in the entire field (as a result of filtering), I don't want to show that field. Is there a way to do this in a qry or frm object? I'd use a pivot, but PT are too slow, and they sometimes crash with amount of data (rows and columns) I'm talking about ..or I get an exceeds capacity error message. Thanks Jerry
3
2357
by: Richard Rudie | last post by:
Anyone know of a proper .NET way to get the state of the user's "hide extensions for known file types" setting? Or should I read the value from the Registry directly (HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt)?
3
8834
by: deciacco | last post by:
I'm trying to write a label printing SDI app with a small preview on the main form itself. Every time I run the InvalidatePreview event on the preview control to redraw the preview I get the "Generating Previews" dialog box while the preview is being generated. I want to suppress this. I've been able to find this from another forum: "The 'Generating Previews' dialog is shown while calculating the layout for pages in OnPaint(). One of our...
3
2217
by: vingomail | last post by:
Let me know how to hide the "__do javascript postback" in the bottom of the browser. it occurs when the user clicks link button or button control and so on
3
3685
by: Akino877 | last post by:
Hello, I am trying to user a File Chooser with DIRECTORIES_ONLY set. And I would like to be able to hide the "Files of type" label and the associated combo box. I wonder if there is a way to do this programmatically or by using NetBeans? Thank you for your help. Akino.
0
8367
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
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 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...
0
8650
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 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...
0
7391
agi2029
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...
1
6206
isladogs
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...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
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...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2781
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 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.