![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I want to output to a textbox but I don't want the user to be able to edit it. Disabling it works nicely but I can't seem to control the color, I only can get that disabled grey color no matter what I set as font color. I can change the background color, just not the font. Is there maybe another way to disable the text box?
|
|
||||
|
You have different possibilites:
1. As already written by brathbone use the IgnoreKey in TextBox_KeyPress 2. Use the TextBoxEx library, with the ReadOnly property Readonly property in the Textbox control or this library with similars properties fgControls-Library 3. Use Label object Label1.Text="123" You can play with all the colors Disadvantages from my point of view: 1. 2. The select highlighting still remains, which can be confusing for the user 3. There is no Border Property We should remember what the TextBox and Label objects are primary intended for: Label Display text, when the user has never to edit any data. TextBox Enter text with a certain number of functions. The gray text shows the user that at certain steps in the program the editing is disabeled. Best regards Klaus Switzerland Last edited by klaus : 02-13-2008 at 09:21 AM. |
|
|||
|
Thank you both, the suggestions worked well. I see what you mean about the highlighting, I suppose if I really wanted to be flashy I could design my own output box image and use the label command in the middle of it to give the desired effect. Thanks again for the help.
|
|
||||
|
Another "small trick" would be to change the focused control upon textbox get focus...But it could also lead to un-wanted behavior...
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can i change the color of text in textbox? | fishworld2006 | Questions & Help Needed | 1 | 08-25-2008 05:54 AM |
| Font Problem ?? | nm7s9 | Questions & Help Needed | 6 | 08-08-2008 12:00 PM |
| different Font at .drawstring | MM2forever | Questions & Help Needed | 3 | 06-30-2008 06:45 PM |
| Disable entries in ComboBox | klaus | Questions & Help Needed | 4 | 05-02-2008 02:46 PM |
| How to disable launch application at given time? | jesb4ppc | Questions & Help Needed | 4 | 07-11-2007 05:48 PM |