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

Apply native formatting from control to copied information from another source

11
I've got a form with several text controls and I'm looking for some code that will help apply the standard font, font size, color, and alignment properties native to that control when I copy text to that control from another source that has different formatting.

Thoughts?
Aug 9 '12 #1

✓ answered by twinnyfo

bkyzer,

If you set the text box's Text Format property to Plain Text, it won't matter what kind of text you copy into that control, it will always have the native text format you have applied to that text box.

However, if you do have it set to rich text, just execute code on the After Update event that will update the font, size, color and alignment properties of that text box.

What solutions have you tried thus far?

2 1611
twinnyfo
3,653 Expert Mod 2GB
bkyzer,

If you set the text box's Text Format property to Plain Text, it won't matter what kind of text you copy into that control, it will always have the native text format you have applied to that text box.

However, if you do have it set to rich text, just execute code on the After Update event that will update the font, size, color and alignment properties of that text box.

What solutions have you tried thus far?
Aug 9 '12 #2
bkyzer
11
Plain test in the properties is just what I need. Just didn't think about that at first. Thanks.
Aug 9 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Daniel Lidström | last post by:
Hello, I really like the way the editor automatically formats pasted code in CS source files. This is a very useful feature and I hope the editor will sometime also do this for C++ files. Just a...
0
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl...
5
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl...
1
by: alf | last post by:
Hi: I'm trying to show a text control in different format but using as condition another control. The idea is: Text1 shows field1 in normal text if field2=1 and Text1 shows field1 in bold text...
1
by: Kinetic - Paul G | last post by:
Hi All Hope someone can help out . . . I have a system that worked fine in A97 .and Win 98 with NT server . . . 10 PCs running a front end MDB and usual backend MDB with tables on the server....
0
by: Evan Stone | last post by:
Does anyone know of a native .NET browser control (or just a different one than the one that encapsulates IE/shdocvw)? I'd love a firefox control, but I realize that's not realistic. I'm just...
2
by: bic | last post by:
asp.net projects can be copied to another machine and work? Or one has to create a new project and then add existing pages and class lib? -- bic
0
by: Coder | last post by:
Hello I want to prevent my Clickonce deployed application being copied and run to another machine, Possible?
8
by: codicecrm | last post by:
Hello! I am trying to apply conditional formatting to several subreports within a main report (Charlie) with code - because I have four conditions. When the value of txt_SafetyFundingNumber is ...
1
by: vikram rawat | last post by:
I want to ask solution of one problem that is: - supppose there is two control in a panel, whenever i drag the one control near the another control in a panel, then it show a dot imag near that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.