473,468 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Text Box Control

Hi

I would like to programatically create a new textbox control - and then copy about a dozen of the properties of a "template" textbox control into it. Right now I'm doing it property by property - I was wondering if there was a "for each" type of approach. If I could copy ALL of the properties from my template textbox, that would also be okay

I'd appreciate any suggestions

Thanks
Nov 20 '05 #1
5 1147
"Arthlan" <ar*****@yahoo.com> schrieb

I would like to programatically create a new textbox control - and
then copy about a dozen of the properties of a "template" textbox
control into it. Right now I'm doing it property by property - I was
wondering if there was a "for each" type of approach. If I could
copy ALL of the properties from my template textbox, that would also
be okay.


I think you must do it manually because not all properties can be copied,
for example the Handle or the Controls properties.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
Arthlan,

why don't you simply inherit TextBox inbto
"Arthlan" <ar*****@yahoo.com> schrieb im Newsbeitrag
news:13**********************************@microsof t.com...
Hi,

I would like to programatically create a new textbox control - and then copy about a dozen of the properties of a "template" textbox control into
it. Right now I'm doing it property by property - I was wondering if there
was a "for each" type of approach. If I could copy ALL of the properties
from my template textbox, that would also be okay.
I'd appreciate any suggestions.

Thanks!

Nov 20 '05 #3
Whopsy,

shouldn't be watching tv while answering to newsgroups - obviously hit the
send button too early...
My answer keeps being thrilling that way, doesn't it? ;-)

Anyway, what I was going to write, wasn't right, anyway.

Armin is right, AFAIK TextBox isn't completely serializable, so you have to
copy property settings the way you already do it.
Using Reflection could be another approach, but that would be breaking a fly
on the wheel...
(God, I love http://dict.leo.org/)

Klaus

"Klaus Löffelmann" <fo***********@loeffelmann.de> schrieb im Newsbeitrag
news:40**********************@news.freenet.de...
Arthlan,

why don't you simply inherit TextBox inbto
"Arthlan" <ar*****@yahoo.com> schrieb im Newsbeitrag
news:13**********************************@microsof t.com...
Hi,

I would like to programatically create a new textbox control - and then copy about a dozen of the properties of a "template" textbox control into
it. Right now I'm doing it property by property - I was wondering if

there was a "for each" type of approach. If I could copy ALL of the properties
from my template textbox, that would also be okay.

I'd appreciate any suggestions.

Thanks!


Nov 20 '05 #4
* "=?Utf-8?B?QXJ0aGxhbg==?=" <ar*****@yahoo.com> scripsit:
I would like to programatically create a new textbox control - and
then copy about a dozen of the properties of a "template" textbox
control into it. Right now I'm doing it property by property - I was
wondering if there was a "for each" type of approach. If I could copy
ALL of the properties from my template textbox, that would also be
okay.


Why not create a control which inherits from 'TextBox' and sets the
property values?

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

Thanks -- I was hoping for an easier way, but this is not so bad

Arthla
I think you must do it manually because not all properties can be copied
for example the Handle or the Controls properties


Nov 20 '05 #6

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

Similar topics

11
by: Ed Suominen | last post by:
I'm thinking of implementing a real-time collaborative text editor in Python using Twisted. An initial plan is to use a Twisted PB server daemon that accepts user:password:file connections from...
6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
13
by: KMiller | last post by:
I would like to control entry into one or more of the tabs > I have set up on my Tab control based on set rules. Does > anyone know how to grey-out the text so that a user will > see that they do...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
5
by: Dinsdale | last post by:
I have an application that recieves text data via external input (i.e. serial) and displays it on the screen (we use carraige return as a delimiter). At this point I use a regular old text box and...
3
by: vtashore | last post by:
I downloaded Steve Leban's RTF2 control and it works as advertised. Good news! After reading reference material on the RTF standard codes, I have been able to write update queries to universally...
12
by: vbnewbie | last post by:
I am having problems accessing properties of dynamically generated objects in VB2005. Can someone please help? In a nutshell: My app creates an equal number of checkboxes and labels that share the...
3
by: GaryDean | last post by:
I have a button field in a gridview defined as follows: <asp:ButtonField ButtonType="Button" CommandName="AcceptOrder" Text="Accept Whole Order"> <ControlStyle Font-Size="X-Small" />...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
11
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.