![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Basic4ppc Wishlist Missing any feature? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Problem with TextBox.Enabled = False or unchecking the enabled checkbox directly in the form editor is that textbox font color change to grey.
What you can do is leaving Textbox enabled and add this method: Code:
Sub Textbox1_KeyPress (key) Textbox1.IgnoreKey End Sub
__________________
Discovering Basic4PPC, Great Job!!! |
|
||||
|
Hi agraham.
Had a little play with your code. Attatched. On the Desktop. When ReadOnlyTextBox.ReadOnly = 'True or False' the textbox remains white and the text is black. On my Device. When ReadOnlyTextBox.ReadOnly = True the entire texbox is gray and the text is black. When TextBox2.Enabled = False, the textbox remains white and the text is gray on both Desktop and Device. Not sure if this is a useless post. It was just an observation. What I do know is that if I start a new #Sharp project and use your code, It will compile and run on the Desktop, but not my device ![]()
__________________
Endemol ![]() Waste of space ![]() O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1 http://www.taximania.net Last edited by taximania : 11-10-2007 at 09:30 AM. |
|
||||
|
Quote:
Are you sure that your compilation is really targeting the device? I don't know SharpDevelop but I believe that it is easy to change the target by a menu option somewhere. |
|
||||
|
I am afraid your code is dangerous - you are adding an events every time the textbox gets the focus and the user can still select the text box. Try this
Code:
Sub Globals 'Declare the global variables here. End Sub Sub App_Start Form1.Show End Sub Sub cmdShow_Click txtReadOnly.Text=txtReadWrite.Text End Sub Sub txtReadonly_GotFocus txtReadWrite.Focus End Sub |
![]() |
| 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 |
| Textbox with ReadOnly,IgnoreKey,TextAlignment | Filippo | Basic4ppc Wishlist | 0 | 11-17-2007 09:23 PM |
| Can ComboBox be setted as readonly? | blackiice | Questions & Help Needed | 4 | 10-24-2007 04:15 PM |
| Textbox Readonly | IansResearch | Questions & Help Needed | 11 | 08-21-2007 12:24 PM |
| Catch hardkeys in textbox control ? | conf | Questions & Help Needed | 2 | 06-15-2007 11:28 PM |
| textbox control error in v5 | Put Claude | Bug Reports | 2 | 05-19-2007 09:22 PM |