 Thread Author
# 1

09-04-2010, 02:53 PM
|
| CrackBerry User Device(s): 8320 (Curve) Carrier: T-Mobile | | Join Date: Apr 2009 Posts: 29 Likes Received: 0
Thanked 0 Times in 0 Posts
| |
FocusIn on a button when an event occurs
I have a fairly straightforward question this time around. I gave up on this when I created my Windows 7 theme, but it seems much more necessary this time around.
A little background: Back when I was doing my Windows 7 theme, I wanted the start button to both hide and show the Start Menu. Someone suggested that I do this by putting two start buttons - when the start menu is hidden, StartButton1 would show it when clicked, and then to set it so as soon as I clicked StartButton1, it would hide itself and StartButton2 would take it's place.
However, there was a problem. When I clicked StartButton1 and hid it and replaced it with StartButton2, the "focus" was still on StartButton1. In essence, the focus dissappeared with StartButton1, and StartButton2 remained unfocused, even though the idea was for the focus to be on it. I eventuallly worked around this by setting it so that focusing in on the StartButton would hide the Start Menu (when it was first clicked, the start menu would show, and then when I was done accessing the start menu, scrolling back down to the start button would hide it).
This was a less than optimal solution, but it flowed nicely with the theme for the time being. Now here is my question:
How do I set a command to focus in on a button when an action occurs. For example, if I clicked Button A, I want the Focus to change to Button B. I know that it would be under the Clicked (or OnClick, I forget) event, but I don't know what the command would be. I do not care if the solution is in hard coding the SVG or simply in Composer. I just want it to work. Here is another example of what I mean: If you think about the dashboard in OS X, when you click it, it dims the screen and brings up a set of buttons. If I knew how to do this, I would put a dashboard button on my theme, and when I click it, I would transfer the focus to one of the icons on the dashboard (which would have popped up by then). I would put a "close dashboard" button on the dashboard so that when clicked, it would hide the dashboard, and then transfer the focus back to the original dashboard button on the homescreen. Sorry if this is hard to follow. I'll post pictures for clarification if anyone requests them. Please help.
|