|
-
May 14th, 2004, 09:32 AM
#1
Thread Starter
pathfinder
[rslvd:Thnx 2 si_the_geek]How do I make a buttons Text = &
I'm adding some buttons dynamically, actually 256 {I'm going to scale that down some}, 1 per each of 255 ASCII codes. And for each, its text = chr(i), i = 0 to 255.
Now, the button who's i = 38 should display as &, but it's blank.
More than likely its because & is the HotKey signifier. How can I make it visible as &?
-Lou
{Hmmm, lets see, maybe look thru & turn off Hotkeying in the keys properties, hmmm}
Last edited by NotLKH; May 14th, 2004 at 10:38 AM.
-
May 14th, 2004, 09:41 AM
#2
In Classic VB ( ) you just set it to && instead, it's probably the same in .Newt
-
May 14th, 2004, 09:45 AM
#3
Thread Starter
pathfinder
True. I think so too. However, then the button is Hot activated by pressing the keyboard key "&", and visually, the command button will have & underlined. Call me picky, but is there a way to do this without making & Hot?
If not, I'll live with it, or perhaps make a bitmap array and use graphics, 1 per key.
-Lou
-
May 14th, 2004, 09:48 AM
#4
Thread Starter
pathfinder
Hmmm. Its NOT hot, nor is it underlined.
VB Code:
If 16 * MyI + MyJ = 38 Then
.Text = Chr(16 * MyI + MyJ) & Chr(16 * MyI + MyJ)
Else
.Text = Chr(16 * MyI + MyJ)
End If
Thanks Si!
-
May 14th, 2004, 09:51 AM
#5
I tried && and it neither activated on & nor did an underline appear.
-
May 14th, 2004, 09:52 AM
#6
good stuff, same as b4 then.
I love answering .Net questions (with VB6 answers!). never even seen .Net myself
-
May 14th, 2004, 10:12 AM
#7
Thread Starter
pathfinder
Great Then!
I'll just add Resolved, and watch my other thread collect dust.
-
May 14th, 2004, 10:23 AM
#8
PowerPoster
Hi,
If you are just amending the Text property of a button or a label then
works perfectly OK without underlining ANY value of chr(i)
but with the text of a textbox you only need
Last edited by taxes; May 14th, 2004 at 10:31 AM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|