ASNA WingsRPG™ Reference Manual

ASNA Wings™ Subfile Example

This example uses the "IronMonger" sample application; Wings Design Aid 6.0 (or Monarch Cocoon 6.0) will modernize the following CUSTDSPF records

<mdf:DdsSubfileControl id="_SFLC" runat="server" 
  style="POSITION: relative;"
  Alias="SFLC"
  CssClass="DdsRecord"
  Width="747px"
  Height="192px"
  FuncKeys="PageUp 51 : !76;PageDown 50 : !77;"
  SetOffInd="79"
  ClearRecords="90"
  DisplayFields="!90"
  DisplayRecords="!90"
  SubfilePage="14"
  SubfileSize="14"
  EraseFormats="CUSTREC SALESREC"
  CueCurrentRecord="true"
  ClickSetsCurrentRecord="true"
  VerticalScrollBar="true"
>

If the two properties below are added manually:

  DblClickTargetField="SFSEL"
 DblClickTargetValue="2"

The modernized (imported) file should look like this:

<mdf:DdsSubfile id="_SFL1" runat="server"
   style="POSITION: absolute; LEFT: 0px; TOP: 168px;"
   Alias="SFL1"
   CssClass="DdsSubfileRecord"
   Width="756px"
   Height="24px"
   UseSubfilePaging="True"
   RowsCssClasses="DefaultRow AlternateRow"
   VirtualRowCol="8,2"
   VirtualWidth="79"
   VirtualRowsPerRecord="1"
>

Note: The record DdsSubfileControl id="_MSGSFC" and corresponding Subfile record DdsSubfile id="_MSGSF" did NOT get any new properties. This is because the Message Subfile is not a record that the user should select anything from (information only).

Results:

  • When running the application, moving the mouse pointer over the (SFL1) Subfile causes the background color of the row immediately under the cursor to change to light-blue.
  • Clicking on a row of the subfile causes that row's background to change to a darker blue, indicating that it is now the "current" row.
  • Pressing Tab to shift the focus to fields in the Subfile, moves the "current" selection to follow the "caret" (insertion point).
  • If you click on the "Position to:" (outside the Subfile), the Page no longer has a "Subfile current selection."

If you add the following Code-Behind method (CUSTDSPF.aspx.cs):

{
   base.OnCopyBrowserToDspFile();
   int cursorLocation = this.DspF.FeedbackCursor;
   int row = cursorLocation >>: 8;
   int col = cursorLocation & 0xff;
}	

If a breakpoint is set at the end of this method, you should see that row and col have values that are in the range {8,2} and {8+14, 2+79} according to where the mouse pointer was when clicking to change the subfile "current record".

Vertical Scrollbar Interface

The scrollbar is implemented as a <div> element that is added to the Subfile <div> as a child node. The scrollbar is 19 pixels wide,and the same height as the subfile's <div> (and thus the subfile's display). Before adding the vertical scrollbar, the subfile <div>'s width is increased by 19 pixels.

Inside the scrollbar <div>, four more <div>s are created and added as children to the scrollbar <div>:

  1. Up arrow: 19x19 px DdsSubfileSBarUp class. The click event is handled to tell the subfile's current record to move one RRN up. If the subfile's current record is already at the top of the visible records, a PgUp is pushed.
  2. Upper half track: 19 px wide, 1/2 scrollbar height – 19 px. The click event is handled to push a PgUp Aid key.
  3. Lower half track: 19 px wide, 1/2 scrollbar height – 19 px. The click event is handled to push a PgDn Aid key.
  4. Down arrow: 19x19 px DdsSubfileSBarDn class. The click event is handled to tell the subfile's current record to move one RRN down. If the subfile's current record is already at the bottom of the visible records, a PgDn is pushed.

Note: There is no "thumb" (block that represents position).