Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invisible buttons hot key
Message
From
24/10/2008 10:14:27
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01356027
Message ID:
01356911
Views:
24
You will laughing.. but... but FOCUS on invisible button is not result of CAPTION of invisible button!!!!!!!!!!!!!!!!
Am I crazy?? I don't know.. but I made a tests.. and when I click ALT-S.. then LABEL!!!! which I put into container.. seems provide focus feature..

So.. the button is - [Container... Label, invisible button inside, 2 pictures for enable/disable, and transparent Shape to catch clicks ]

So.. I put the label with caption "\Search" -
Then - when I press ALT-S - then... FIRST OBJECT IN THE CONTAINER where label located - got focus!!!!!!!
I never knew about such behaviour! but it seems realy true!
But.. also then problem - Label has NO EVENTS for this.. and again.. CLICK does not works.. and label has not EVENTS

Question still open!


>The other non-elegant solution (and I think already sort of proposed) would be to have a complete double set of buttons that would emulate the Office style buttons. This set of button would be set somewhere at -1000 in the form. Though I'm not sure what visual undesired effects this solution may cause.
>
>
>
>>Denis
>>dobroje utro
>>
>>Then one good thing I could tell you that is it simple to avoid the listen events on unvisible Pageframes.
>>Every object has an UIENABLE event.
>>
HELP UIENABLE
>> If it receives .T., BIND your objects, if it receives .F. UNBIND. So there is no need to bind all objects in forms init.
>>
>>The problem is that you need to figure out which page is first. One way would be to
>>
>>lnPage = pageframe.ACTIVEPAGE
>>pageframe.ACTIVEPAGE = 0
>>pageframe.ACTIVEPAGE = lnPage
>>
>>in your forms init.
>>
>>It may also speed up if you avoid the ASCAN. Think about a ASSIGN to CAPTION that reads those number and store it to a property, so the "CatchKey_Event" need only to compare two numbers. This will work much faster. In this case I would create the array only in the ASSIGN. Since the ASSIGN will not work for propertys set in the designer you would need a
>>
THIS.CAPTION = THIS.CAPTION
>>line in buttons init
>>
>>BTW
>>
>>Do buttons in Office receive KEYPRESS or are they toolbars? A toolbar object normaly does not receive a keypress ....
>>
>>Agnes
>>>Hi Agnes,
>>>Yes.. the idea with BindEvents() is quite good.. I thinking it will work.
>>>I just thinking.. how many buttons will listen the same keypress event.. 20... 50.. each keypress willl fair catch_keypress in 50 buttons.. every button will check if its the keycode whats neccessary...... hmmm..
>>>Now.. lets think.. user type text in Editbox.. what will happens in system.. each key press will far 50 events.. where 50 methods will check hot keys..What's happens with performance?
>>>and for example.. our application using Pageframe as host for containers.. sometimes its 27 pages.. each 27 pages has buttons.. maybe.(maybe) on page 1.. exist button with hot key "S"... and on page10 also.. and on page12 also..
>>>Can you imagine whats heppens then?! :))))
>>>
>>>The code what I writing - its a code for restyle existing application.. just lifting of interface, make it more modern and beauty..
>>>So far.. I thinking.. your solution will works.. but.. but past of this solution might be on my look more horrible then advantage :)))
>>>
>>>Denis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform