473,586 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Listbox questions

Two small problems relating to Listboxes in VB6

1) How do I copy an item from the list box when selecting
a particular entry

2) How do I set tab stops when adding fields to the list
box.

Your help is greatly appreciated
Oct 4 '06 #1
3 6628
"Geoff" <gf****@freenet name.co.uk>'s wild thoughts were
released on Wed, 4 Oct 2006 21:16:37 +0100 bearing the
following fruit:
>Two small problems relating to Listboxes in VB6

1) How do I copy an item from the list box when selecting
a particular entry
Your going to have to provide a bit more info.
>2) How do I set tab stops when adding fields to the list
box.
You don't tab through items in a listbox and therefore there
are no 'tab stops'

Jan Hyde (VB MVP)

--
Meditation is not what you think.

Oct 5 '06 #2
Geoff wrote:
Two small problems relating to Listboxes in VB6

1)How do I copy an item from the list box when selecting a particular
entry
Copy to where?
You can get the items text using combobox.text
2) How do I set tab stops when adding fields to the list box.
You send it the LB_SETTABSTOPS with a pointer to an array of tabstop
positions.

You can find full information on the message in MSDN.

--
Dean Earley (de*********@ic ode.co.uk)
i-Catcher Development Team

iCode Systems
Oct 5 '06 #3

"Geoff" <gf****@freenet name.co.ukwrote in message
news:TM******** ************@br ightview.com...
Two small problems relating to Listboxes in VB6

1) How do I copy an item from the list box when selecting a
particular entry

2) How do I set tab stops when adding fields to the list
box.

Your help is greatly appreciated
See Randy Birch's example (and other good stuff):

http://vbnet.mvps.org/code/listapi/listboxtabs.htm

Oct 5 '06 #4

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

Similar topics

4
5630
by: wallacej | last post by:
I am trying to retrieve a selected value from a listbox and store it in a string (char) variable. I am using the following code: calibIndex=SendMessage(hWnd,(UINT)IDC_LIST_CALIBOPTS,(WPARAM)0, LPARAM)0); SendMessage(hWnd,(UINT)LB_GETTEXT,(WPARAM)calibIndex,(LPARAM)selectedCalib); Where IDC_LIST_CALIBOPTS is the list and selectedCalib is...
4
1431
by: google | last post by:
Hi Heres how the following code works. A user selects a number from a listbox, and then javascript generates that many textboxes. ie. If a user selects 5 from the listbox, then 5 text boxes will appear. Problem is, javascript blanks the page out first. We really need the textboxes to appear underneath the listbox, instead of clearing...
5
6334
by: Lisa | last post by:
Hello, I am new to using recordsets, and i am completly stuck with this one. I am trying to use a multi select list box to write records to a table. Something in my code is causing the same record to be written over and over, for example if I have 4 items selected, it writes the same item 4 times in my table. Here is my code.
0
1275
by: Park via AccessMonster.com | last post by:
I am new to Access and am having a problem with a simple listbox. This listbox is in a subform and contains 5 options. I entered these in a value list. There are two behaviors that I don't know how to change. First, when I select an item from the list, I have to then click inside the box in order to get the value written to the table record....
0
229
by: Oren | last post by:
Hi I have 2 simple questions and hope someone can help me 1) I have an aspx page with the Control: HTML ListBox on it (runat=server). I'm adding options in JavaScript .... mySelect = document.addFiles.lis var myI = mySelect.selectedIndex + mySelect.options = new Option(sFile,"2" ...
8
2344
by: Steve Schroeder | last post by:
For some reason I cannot get the OnSelectedIndexChanged event to fire for a listbox I have on a page. I'm able to populate the listbox with data from a stored procedure, but cannot trigger the event. I do have EnableViewState = True for the listbox. I'm imagining (wanting) to populate the listbox named: lstNames by using the DataValueField...
6
2335
by: Paul | last post by:
Hi All, Framework 1.1 listbox control unable to DataBind I've been googling for an answer to this query that appears quite a lot, but none, it seem, answers my problem directly. I am populating a listbox with an array of very simple "Country" objects via a WebService. The Country class contains CountryID,TLDs and Name properties each...
3
2472
by: deejayquai | last post by:
Hello Simple one this I guess, but I'm quite stuck at the moment. I would like to update the records displayed in my listbox (lstStudents) using criteria selected from my combo (cboForm) in a form. My basic code is:
5
2841
by: Academia | last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it there.) I have a listbox populated with Objects. The Class has a String field that ToString returns. I assume that is what the ListBox uses for its display. Correct?
1
943
by: John | last post by:
Hi I have a few questions regarding Listbox; 1. How can I fill Listbox from an access table with multiple columns? 2. How can I return the user selected (highlighted) items in a Listbox individually? 3. How can I remove user selected (highlighted) items from a Listbox?
0
7912
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...
0
7839
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...
0
8338
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...
1
7959
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...
0
8216
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...
1
5710
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...
0
3837
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...
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
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...

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.