By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,587 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,587 IT Pros & Developers. It's quick & easy.

strikethrough text

100+
P: 553
Hi Everyone

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

Thanks
Qi
Oct 12 '07 #1
Share this Question
Share on Google+
6 Replies


nico5038
Expert 2.5K+
P: 3,072
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
Expert 5K+
P: 8,633
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
Expert 100+
P: 897
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
Expert 5K+
P: 8,633
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

100+
P: 553
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
Expert 5K+
P: 8,633
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

Post your reply

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