Switch to standard view 
  Sybase logo

DataWindow Dialog Box Techniques (PB 4.0, 5.0, 6.0, & 7.0)

Many of the dialog boxes available to the developer in the DataWindow painter can also be
made available to users of your application. Here are the dialog boxes and the methods for
making them appear:

Invoking DataWindow Built-in Dialogs

Filter dialog - Set a string variable to null and pass as argument to the SetFilter function. Then issue the Filter function.

Sort dialog - Set a string variable to null and pass as argument to the SetSort function. Then issue the Sort function.

Import file dialog - Pass an empty string as the argument to the ImportFile function.

Save As dialog - Issue the SaveAs function with no argument.

Retrieval argument dialog - Issue the Retrieve function with no argument. If the DataWindow object was built to expect an argument, the dialog box will appear.

Prompt for Criteria dialog - In PB 4, 5, and 6, can be made to appear by checking the Rows/Prompt for Criteria menu item in the DataWindow painter. In PB 7, this can be made to appear by checking the Prompt checkbox in the Column Specification view in the DataWindow painter.

Adding a Help Button to the Built-in Dialogs

You can add a Help button to each of the above dialog boxes and point it to a custom help file of your own. The button can simply show the help Index or you can cause each dialog box to access its own help Topic or Keyword page within the help file.

Use Modify( ) or DataWindow Dot Notation to set this up as follows. For each instance the 1st example uses the modify function and the second example uses Datawindow Dot Notation.

// Specifies the help file name...
dw_1.Modify("datawindow.help.file = 'c:\mydwhelp.hlp'")

// Tells what type of help command (1=Index, 2=Topic, or 3=Keyword) is being used...
dw_1.Modify("DataWindow.Help.Command = 2")
dw_1.object.DataWindow.Help.Command = 2

// Specifies desired help keyword for ImportFile dialog (Can be any keyword in your help file)...
dw_1.Modify("DataWindow.Help.TypeId.ImportFile = 'import'")
dw_1.object.DataWindow.Help.TypeId.ImportFile = 'import'

// Desired keyword  for File save dialog box ...
dw_1.Modify("DataWindow.Help.TypeId.Saveas = 'save as'")
dw_1.object.DataWindow.Help.TypeId.Saveas = 'save as'

// Desired keyword for Filter dialog box...
dw_1.Modify("DataWindow.Help.TypeId.SetFilter = 'filter'")
dw_1.object.DataWindow.Help.TypeId.SetFilter = 'filter'

// Desired keyword for Sort dialog box...
dw_1.Modify("DataWindow.Help.TypeId.SetSort = 'sort'")
dw_1.object.DataWindow.Help.TypeId.SetSort = 'sort'

Back to Top
© Copyright 2010, Sybase Inc.