0

This is my first visual basic 5 project and it's for work not a school assignment. Any help is appreciated.

I'm displaying lines from a file in a listbox and I'm highlighting each line according to a timer. I don't want any user clicking in the listbox, but when I set list1.enabled = false, the text grays out.

How do I keep the text from graying and/or the user from clicking? I tried setting the list1.forecolor property, but that didn't work. Should I be using something besides a listbox to display the file contents?

4
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by wwillow
0

I dont think it is possible to do that.
you could try using a combo box but they can still click.
i think the combo box will work best here just set the size of it so that they can only view them one at a time and they can scroll by click next to it.

0

Thanks for your response, 2thestart.

I'm already using a combo box to display the activities that the user can select.

Once the user selects an activity, the steps for that activity are read in from a text file and displayed in the list box. The steps are then highlighted line-by-line using a timer.

Step 1 for x amount of minutes
Step 2 for x amount of minutes
...etc

I need to display all the steps, so the user knows what coming.

The activity can last for hours, so I didn't want the user to be able to click in the list box and select a line. But if I disable the list box, the gray text doesn't look good.

What to do???

0

My guess is, but I have not tried it is to allow the mouse clicks but put nothing in subroutine that normally reponds to mouse clicks.

0

I would think that being able to click on it would be ok because if it goes to fast some how or they wanted to go back to look at something. O well i will look into it some more.

0

Hi WWillow,

Keep it Simple,

Place The ListBox On the Frame, And Disable the Frame , Enable the List Box, ur job will be done.

Regards
Veena

0

Veena,

Your solution works perfectly. Thanks so much for taking the time to reply.

And thanks to all for your suggestions.

This question has already been answered. Start a new discussion instead.
Take the time to help us to help you. Please be thoughtful and detailed and be sure to adhere to our posting rules.