473,387 Members | 1,534 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,387 software developers and data experts.

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.visible = 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 selectedindexchanged
event on the bottom combo box.

Any help appreciated.

SC

Nov 18 '05 #1
2 2187
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**************@TK2MSFTNGP09.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.visible = 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 selectedindexchanged
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*******@discussions.microsoft.com> wrote in message
news:D4**********************************@microsof t.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="Javascript" for="combo3" event="onchange">
{
window.document.all.combo2.style.display = "none";
or window.document.all.combo2.style.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.visible = 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 selectedindexchanged 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
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...
1
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...
2
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 =...
4
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...
3
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...
3
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...
3
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...
3
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
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...

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.