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

Comboboxes

2 more quick questions...

1) Is it possible to lock a combobox at runtime until a
predefined condition has been met(for example password /
username entered correctly) at which point it would allow
access to change the value in the combobox ? I would like
to do this without using enabled = true or false

2) Is it possible to assign a different color of text to
each item stored in the combobox?

Any help is greatly appreciated

Thanks in advance

Regards Steve
Nov 20 '05 #1
3 1021
1) there are ways to do this ill give you 1
use a boolean flag to determine if your conditions are met (its always
false and when your conditions are met set it to true)
in the selected index changed event of the combo put an if structure
\\
if not blnControle then
combo.selectedindex = -1
end if
//

2) dont know
but i do know if you populate the combo w your own class that has a
overides to string parameter you get text of that class
it's possible that you can override the color 2 (this is one for the
experts ;) )
hope it helped
eric

"Steven Smith" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
2 more quick questions...

1) Is it possible to lock a combobox at runtime until a
predefined condition has been met(for example password /
username entered correctly) at which point it would allow
access to change the value in the combobox ? I would like
to do this without using enabled = true or false

2) Is it possible to assign a different color of text to
each item stored in the combobox?

Any help is greatly appreciated

Thanks in advance

Regards Steve

Nov 20 '05 #2
> "Steven Smith" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
2 more quick questions...

1) Is it possible to lock a combobox at runtime until a
predefined condition has been met(for example password /
username entered correctly) at which point it would allow
access to change the value in the combobox ? I would like
to do this without using enabled = true or false
What if you fill the combo after the password / username are entered
correctly is added rather than simply in the load event?
2) Is it possible to assign a different color of text to
each item stored in the combobox?
Not without ownerdraw - Which may be more effort than you want to extend.
An article on ownerdraw is here;
http://www.codeproject.com/vb/net/multicolumncombo.asp although it does not
do what you want you may garner the needed elements to make a better
decision regarding effort level needed vs ROI.

HTH,
Joe Johnston
www.gotboxer.com


Any help is greatly appreciated

Thanks in advance

Regards Steve


Nov 20 '05 #3
* "Steven Smith" <an*******@discussions.microsoft.com> scripsit:
1) Is it possible to lock a combobox at runtime until a
predefined condition has been met(for example password /
username entered correctly) at which point it would allow
access to change the value in the combobox ? I would like
to do this without using enabled = true or false
Why not use 'Enabled = False'?
2) Is it possible to assign a different color of text to
each item stored in the combobox?


Ownerdrawn combobox...

You will find some samples in C# here, it's very similar in VB.NET:

<http://www.codeproject.com/cs/combobox>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

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

Similar topics

4
by: Kathy | last post by:
In my custom menu one menu item opens a form to add new Makes to TblMakes and another menu item opens a form to add new Models to TblModels. I have a form that has a combobox for Makes and a...
0
by: johnson_cy | last post by:
I am using Access 2000. My main form has a record source of a table (employeeTbl with key of . It is filtering the record results. My subform and mainform have the link child/link master set...
1
by: Craig G | last post by:
for months we have been dabling round looking at various 3rd party comboboxes that allow the user to type text into the combobox as a search mechanism what we've found is that the likes of...
1
by: Marcin Podle¶ny | last post by:
Hi, I've a form with three comboboxes. Each of them contains the same data - all cities in my country. As you see it's a lot of data so it takes a lot of memory. I'd like to use the same...
6
by: Sam | last post by:
Hi, I have a datagrid which has (amongst other stuff) 2 comboboxes columns. So far so good. The trick is that when I select a value in my first column, it must updates the items of the combobox in...
2
by: ashishtarlekar | last post by:
Hi all, I have to add comboboxes in the first row of datagridview for mapping the database fields. For e.g. I have to show Id, FirstName, LastName in each comboboxes in the first row. if i select...
2
by: Matt | last post by:
Hi all, me again! :) I've now got an issue with combo boxes. Basically, I have a number of items that I want a user to pick from a single list. It's basically along the lines of: Fruit 1: ...
3
by: Randy | last post by:
I have a routine that creates a series of comboboxes, each of which is bound to a common dataview. Everything used to work fine, but now, when I change the value of any of the comboboxes, the...
5
by: Anthony Bollinger | last post by:
I have two tables in a master-detail relationship. When I make a selection in one combobox, how do I have it display the values from a second combobox? Each table has a key and a text value for...
2
by: Wingot | last post by:
Hey, I have a view to a database that I have created for Client Maintenance. It has a number of fields, but the important ones are Medical Condition, Bill To, and Country. I have a couple of...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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,...
0
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...
0
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,...

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.