baddy
09-07-2000, 11:14 PM
I am using tab key to switch between 16 boxes, and I want the one in focus to have a dotted-box outlining it. Is there anyway I can go about doing it, other then writing the entire method by myself?
outline a boxbaddy 09-07-2000, 11:14 PM I am using tab key to switch between 16 boxes, and I want the one in focus to have a dotted-box outlining it. Is there anyway I can go about doing it, other then writing the entire method by myself? Dazz 09-08-2000, 04:00 AM I can't think of a way without coding it, but that should not be that hard. I am assuming we are talking about textboxes, if so an alternative may be to set all of the Appearances for the boxes to Flat, and then in gotfocus set the property to 3D. Not what you wanted but will make the box with the focus stand out a little bit. If you still want the dotted line, I can help with the code. baddy 09-08-2000, 04:40 AM I am talking about frames. :) Sadly, there is no gotfocus event related to frames.... So what should I do? Grimfort 09-08-2000, 07:29 AM The reason you there is no Focus event on a frame is cos you cant set focus to it. What's the reason you are tabbing through the frames ? Are there controls in these frames ? Grimfort Dazz 09-08-2000, 07:54 AM I don't understand, there must be more to it! You can't tab to a frame, so you can't focus it. Can you post a bit of code or a screen shot of the form you are talking about? NoahBody 09-08-2000, 10:59 AM Ok, Try this: Make two component arrays. One of your text boxes and one of your frames that contain the text boxes. Just make sure that the index for each text box is the same as it's surrounding frame. Then when a particular text box gets focus, use it's index to reference it's corresponding frame and make it visible. Use the _LostFocus method to make it invisible. Hope This Helps, ->Noah BillSoo 09-08-2000, 12:27 PM One way to make a box stand out is to change it's background colour. If you want a dotted line though, you could put a shape on the form with a dotted line style. Make it invisible. Then when a box gets the focus, move the shape to the box and make it visible. Here's and example of the code used. I have an array of textboxes and one shape object. Private Sub Text1_GotFocus(Index As Integer) With Text1(Index) Shape1.Move .Left - 10, .Top - 10, .Width + 30, .Height + 30 End With Shape1.Visible = True End Sub Private Sub Text1_LostFocus(Index As Integer) Shape1.Visible = False End Sub "I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder baddy 09-11-2000, 02:38 AM Thank u ppl !!! I will try out your suggestions !! :) |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum