473,756 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listbox: How do I empty the view in the window

Hi all,

I can't figure this out. I want the ability to delete an item in a
listbox and leave the window area blank, like it is when the listbox
is first created and nothing selected.

Right now the following is happening. If I simply delete the item in
the listbox, that item will stay in the view window until another item
is selected. Or I can select an item in the listbox as active and then
view it, but I don't want to do that.

I'm using the listbox to allow a user to either enter or select on
option. As a result, I need the ability to clear out the window so
they can type in their own selection.

Can someone tell me how to do this?

Thanks,
Marc
Jul 18 '05 #1
2 2481

"Marc" <mn******@airma il.net> schrieb im Newsbeitrag
news:43******** *************** ***@posting.goo gle.com...
Hi all,

I can't figure this out. I want the ability to delete an item in a
listbox and leave the window area blank, like it is when the listbox
is first created and nothing selected.

Right now the following is happening. If I simply delete the item in
the listbox, that item will stay in the view window until another item
is selected. Or I can select an item in the listbox as active and then
view it, but I don't want to do that.
Widgets are nor always aware whether their displayed view has been modified.
You can force this by:

widget.update()

I'm using the listbox to allow a user to either enter or select on
option. As a result, I need the ability to clear out the window so
they can type in their own selection.

Can someone tell me how to do this?


Is this another question? Have you considered to use some MPW widget as
ComboBox?

Kindly
MichaelP
Jul 18 '05 #2
Actually I was using the ComboBox but was just asking about the listbox part
of it. I was not aware of the .update() function. I had found a workaround
by deleting out the entryfield directly, but the update may be a cleaner
solution.

Thanks,
Marc
"Michael Peuser" <mp*****@web.de > wrote in message
news:bl******** *****@news.t-online.com...

"Marc" <mn******@airma il.net> schrieb im Newsbeitrag
news:43******** *************** ***@posting.goo gle.com...
Hi all,

I can't figure this out. I want the ability to delete an item in a
listbox and leave the window area blank, like it is when the listbox
is first created and nothing selected.

Right now the following is happening. If I simply delete the item in
the listbox, that item will stay in the view window until another item
is selected. Or I can select an item in the listbox as active and then
view it, but I don't want to do that.
Widgets are nor always aware whether their displayed view has been

modified. You can force this by:

widget.update()

I'm using the listbox to allow a user to either enter or select on
option. As a result, I need the ability to clear out the window so
they can type in their own selection.

Can someone tell me how to do this?


Is this another question? Have you considered to use some MPW widget as
ComboBox?

Kindly
MichaelP

Jul 18 '05 #3

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

Similar topics

1
2919
by: Vengeance | last post by:
On the parent_form.aspx I have these controls <asp:listbox id="Operators" runat="server" Width="163px" SelectionMode="Multiple" Rows="2"></asp:listbox> <INPUT class="loButton" onclick="java script:getOptionPicker('?mid=TS5 &callingcontrol=Operators');" type="button" value="+"> <asp:button id="save" runat="server" CssClass="loButton" Text="Save"> </asp:button> I also use a global.js file which adds the following functions
3
5309
by: Alan Lane | last post by:
Hello world: I have a Parent form with a combobox, where the user selects a Contract or Estimate number. Then, on a subform, I have a listbox that gets filled with the details of the selected Contract. The subform listbox shows 21 rows. That has been fine, but now we are starting to get some Contracts or Estimates with more than 21 items.
3
2133
by: Pafo007 | last post by:
Hi. I've built a small window, with some buttons and labels, and one listbox. During design time, I put five lines in the listbox and launch the program: the listbox appears empty! I can select the first five lines, but they become blue (=selected) without any text. I tried to feel the listbox during runtime, but I got the same result. If I catch listbox1.SelectedItem.ToString() when one of the 5 lines is correctly selected (but always...
1
1806
by: yma | last post by:
Hi, I tried to use a listbox to display a column in MS Access 2000 nwind.mdb by using ole DataAdapter, Connection and dataset controls. But I got "It is already opened exclusively by another user, or you need permission to view its data." I put ole DataAdapter, Connection and dataset controls and fill in the properties of the listbox. The only code I have is OleDbDataAdapter1.Fill(DataSet11, "employees") in page_load sub. How can I...
1
2885
by: JMann101 | last post by:
I am writing a ASP.NET(VB) application and am having some trouble. I have a datagrid which list users and when an admin clicks "edit" a defined column becomes visible and a dynamic listbox control is added to that column/row. When the admin clicks "update" I am unable to retrieve the values that were selected from that listbox. Basically, This is a multi-select listbox, so I need to loop to pull all selected items. This is the only...
4
3333
by: s | last post by:
I'm able to get the count of the filtered rows of the dataview from within the With view block, but when I try to bind the view to the listbox I don't get any count within the With lb1 block and my listbox is empty. What's wrong? Dim view As New DataView(tbl) With view .AllowDelete = True .AllowEdit = True .RowFilter = "name like '" & cb1.Text & "%'" .RowStateFilter = DataViewRowState.ModifiedCurrent
15
49432
by: allansiu823 | last post by:
Hi I am new to MS Access and VBA and have been bothered by this problem for a looooong time. I have this listbox containing all the records (~1000) in a form and I want to be able to type something in and match it with the matching record IN the listbox. I want it to work exactly like the "Find" function in the "Edit" Menu on the Toolbar, however the Find function does not search anything within the listbox. I tried tp create a textbox and...
3
5768
by: perrycheung221 | last post by:
Hi guys, I got 2 listboxes in a window form, one on left and one on right. The 1st listbox have some items while the 2nd listbox is empty. Also there are 2 buttons between the 2 listboxes which used to move item from/to the 1st and 2nd listbox My problem here is that after I bind the data to the 1st listbox (from a dataTable, using DisplayMember and ValueMember), and I try to move 1 of the item from this 1st listbox to the 2nd listbox...
4
9382
by: Dave | last post by:
I recently found out that the RequiredFieldValidator works differently for a ListBox than I needed; it checks to see if a row is selected, rather than checking to see if the listbox is empty. I tried using a CustomValidator but it does not seem to be firing (I have e.false in the validation function but still no intervention). Does the CustomValidator also require that a row is selected? Can I use validators for this requirement or do I...
0
9431
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10014
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, 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...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8688
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
7226
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
6514
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
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
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
3
2647
bsmnconsultancy
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...

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.