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

strikethrough text

553 512MB
Hi Everyone

Is there a way to display in a textbox a strikethrough text ?

Thanks
Qi
Oct 12 '07 #1
6 13933
nico5038
3,080 Expert 2GB
No. Certainly not for a part of the text.
For this you'll need to use a .rtf control that supports strike-through, or an embedded .doc document.

Nic;o)
Oct 12 '07 #2
ADezii
8,834 Expert 8TB
Hi Everyone

Is there a way to display in a textbox a strikethrough text ?

Thanks
Qi
Here is one of my closest guarded secrets which I will gladly share with you. You can display 'pseudo' StrikeThrough Text in Access, although not directly. Follow these simple steps
  1. Create 2 Text Boxes named txtText and txtOverlay.
  2. Make these 2 Text Boxes exactly the same size, either by code or manually.
  3. Place txtOverlay exactly on top of txtText, again, either by code or manually.
  4. Run the following code wherever appropriate:
    Expand|Select|Wrap|Line Numbers
    1. Const conTransparent = 0
    2.  
    3. 'Should be a Fixed Width Font
    4. Me![txtText].FontName = "Courier New"
    5. Me![txtText].FontSize = 12
    6. Me![txtText] = "Philadelphia"
    7.  
    8. Me![txtOverlay].FontName = "Courier New"
    9. Me![txtOverlay].FontSize = 12
    10. Me![txtOverlay].BackStyle = conTransparent
    11. Me![txtOverlay] = String(Len(Me![txtText]), "-")
    12.  
  5. Any questions or comments, feel free to reply.
NOTE: It ain't perfect, but it ain't bad also.
Oct 13 '07 #3
Jim Doherty
897 Expert 512MB
Here is one of my closest guarded secrets which I will gladly share with you. You can display 'pseudo' StrikeThrough Text in Access, although not directly. Follow these simple steps
  1. Create 2 Text Boxes named txtText and txtOverlay.
  2. Make these 2 Text Boxes exactly the same size, either by code or manually.
  3. Place txtOverlay exactly on top of txtText, again, either by code or manually.
  4. Run the following code wherever appropriate:
    Expand|Select|Wrap|Line Numbers
    1. Const conTransparent = 0
    2.  
    3. 'Should be a Fixed Width Font
    4. Me![txtText].FontName = "Courier New"
    5. Me![txtText].FontSize = 12
    6. Me![txtText] = "Philadelphia"
    7.  
    8. Me![txtOverlay].FontName = "Courier New"
    9. Me![txtOverlay].FontSize = 12
    10. Me![txtOverlay].BackStyle = conTransparent
    11. Me![txtOverlay] = String(Len(Me![txtText]), "-")
    12.  
  5. Any questions or comments, feel free to reply.
NOTE: It ain't perfect, but it ain't bad also.

Oh I don't know? ardent residents of 'Philadelphia' might say it was pretty much perfect Dez? :)

Jim
Oct 14 '07 #4
ADezii
8,834 Expert 8TB
Oh I don't know? ardent residents of 'Philadelphia' might say it was pretty much perfect Dez? :)

Jim
As you probably guessed, I'm from Philadelphia - not that I'm bragging about that. (LOL).
Oct 14 '07 #5
questionit
553 512MB
Adezzi

Thats good.

But ofcourse if you click on the textbox, the txtText will disappear.
Also, if there are so many textboxes , it probably wouldn't be feasible to make many extra textOverLay textboxes

Thanks for a solution

Qi

Here is one of my closest guarded secrets which I will gladly share with you. You can display 'pseudo' StrikeThrough Text in Access, although not directly. Follow these simple steps
  1. Create 2 Text Boxes named txtText and txtOverlay.
  2. Make these 2 Text Boxes exactly the same size, either by code or manually.
  3. Place txtOverlay exactly on top of txtText, again, either by code or manually.
  4. Run the following code wherever appropriate:
    Expand|Select|Wrap|Line Numbers
    1. Const conTransparent = 0
    2.  
    3. 'Should be a Fixed Width Font
    4. Me![txtText].FontName = "Courier New"
    5. Me![txtText].FontSize = 12
    6. Me![txtText] = "Philadelphia"
    7.  
    8. Me![txtOverlay].FontName = "Courier New"
    9. Me![txtOverlay].FontSize = 12
    10. Me![txtOverlay].BackStyle = conTransparent
    11. Me![txtOverlay] = String(Len(Me![txtText]), "-")
    12.  
  5. Any questions or comments, feel free to reply.
NOTE: It ain't perfect, but it ain't bad also.
Oct 15 '07 #6
ADezii
8,834 Expert 8TB
Adezzi

Thats good.

But ofcourse if you click on the textbox, the txtText will disappear.
Also, if there are so many textboxes , it probably wouldn't be feasible to make many extra textOverLay textboxes

Thanks for a solution

Qi
You are right on both counts. It was just meant to be icing on the cake, and the disappearing Text can be worked around.
Oct 15 '07 #7

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

Similar topics

3
by: Xerxes | last post by:
Hi, I need help in setting up a page where the text wraps around an image. Right now, I am using table, with text in one <td> and the image in the adjacent <td>. The problem is when the text is...
3
by: NB | last post by:
Hi, Is it possible to set the default font size and name, etc for the Leban's Rich Text box. I am using the latest version 1.5 but the following code does not work (but also produces no errors.)...
0
by: a | last post by:
Save text file as html kloepper 17:42 23 Jul '04 I'm using httpwebresponse and a StringBuilder to return a stream that originates as a file with the .txt suffix (My download code converts the html...
2
by: VB Programmer | last post by:
I have a gridview control with several data fields. When the user clicks 'edit' for the row I want the user to be able to edit a particular text field. Under that 'edit' textbox is a button. ...
4
by: Prof | last post by:
I am just learning javascript, and i wanted to strike a text in a normal <ptag using javascript. I have tried to use a old script found in th forums , it works , although it uses the <atag and...
2
by: yashgt | last post by:
Hi, Does anyone have any experience with any JS library that provides a rich text editor? I am particularly interested in the MS-word like feature of tracking changes. Simple features like...
3
by: yashgt | last post by:
Hi, Does anyone have any experience with any JS library that provides a rich text editor? I am particularly interested in the MS-word like feature of tracking changes. Simple features like...
4
by: R144N | last post by:
Hi Everyone, I've searched variuos forums as much as I could for a similar problem within the time I could and found no helpful solution, I hope someone here can help me out: I have an iFrame...
4
TheSmileyCoder
by: TheSmileyCoder | last post by:
I have an excel sheet, in which text has been formatted, and the format has a "meaning". For example text formatted as "Strike-through" means the text is deleted. I now need to import this into...
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.