473,320 Members | 2,180 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,320 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 2183
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.