Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TableView (F7) restriction?

Status
Not open for further replies.

almir

Technical User
Apr 18, 2000
46
BA
Any idea how to restrict (limit) user to open table only through form, but not through Project Viewer, i.e. in table window?

I want to prevent user of opening tables in table window (F7 or "Table View").

We use Corel Paradox 9/Windows 2000 in network environment about 30 users) with about 150 tables.

Is that possible? Thanks in advance
 
If you are using Runtime, table view is not available anyway. Otherwise, trap for the F7 Keyphysical event of the form and disable the default behavior.

Code:
if eventInfo.vCharCode() = VK_F7
   	then disableDefault
endif
Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Mac,

Hm. I'd rather you blocked the action that the F7 key triggers instead of just the key itself. After all, there's more than one way to open a tableview window.

Something like this in the action() event of the form object should be more effective:

Code:
method action(var eventInfo ActionEvent)

   if not eventInfo.isPreFilter() then

      ;// This code executes only for the form
      if eventinfo.id() = dataTableView then
         eventInfo.setErrorCode( userError )
         beep()
      endIf
		
   endIf
endMethod

This will prevent the keystroke, the menu command, and the toolbar button from working.

Hope this helps...

-- Lance
 
Lance is correct, of course. I am so used to using keystrokes for things I sometimes forget about other methods. Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top