Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/foia-cprs/CPRS-Lib/ORCtrls.pas

    r459 r460  
    2626     FOnEnter: TNotifyEvent;
    2727     FOnExit: TNotifyEvent;
    28   protected
    29 
    3028  published
    3129     property OnEnter: TNotifyEvent read FOnEnter write FOnEnter;
     
    543541    property OnSynonymCheck: TORSynonymCheckEvent read GetOnSynonymCheck write SetOnSynonymCheck;
    544542    property CharsNeedMatch: integer  read FCharsNeedMatch  write SetNumForMatch;
     543{UniqueAutoComplete Was added as a result of the following defects:
     544 7293 - PTM 85:  Backspace and Dosage:  Desired dosage does not populate if dosage is not in local dosage field
     545 7337 - PTM 160 Meds: #8 IMO - Simple - Change Order in which Error generated if "Enter" is hit instead of "OK"
     546 7278 - PTM 36 Meds: Select 40000 UNT/2ML and backspace to 4000 the dose selected remains 40000
     547 7284 - Inconsistencies of pulling in a dose from the Possible Dose File }
    545548    property UniqueAutoComplete: Boolean read FUniqueAutoComplete write SetUniqueAutoComplete default False;
    546549  end;
     
    898901  TCaptionListBox = class(TListBox)
    899902  private
     903    FHoverItemPos: integer;
    900904    FAccessible: IAccessible;
    901905    FRightClickSelect: boolean;                  // When true, a right click selects teh item
     906    FHintOnItem: boolean;
    902907    procedure SetCaption(const Value: string);
    903908    function GetCaption: string;
    904909    procedure WMGetObject(var Message: TMessage); message WM_GETOBJECT;
    905910    procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP;
     911    procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE;
    906912  protected
    907913    FCaptionComponent: TStaticText;
     914    procedure DoEnter; override;
    908915  public
    909916    procedure MakeAccessible( Accessible: IAccessible);
     
    911918    property RightClickSelect: boolean read FRightClickSelect write FRightClickSelect default FALSE;
    912919    property Caption: string read GetCaption write SetCaption;
     920    //Make the ListBox's hint contain the contents of the listbox Item the mouse is currently over.
     921    property HintOnItem: boolean read FHintOnItem write FHintOnItem default FALSE;
    913922  end;
    914923
     
    14401449end;
    14411450
    1442 {  ----------------------------------------------------- }
     1451{ TORStaticText }
     1452
    14431453procedure TORStaticText.DoEnter;
    14441454begin
     
    14541464     FOnExit(Self);
    14551465end;
    1456 
    14571466
    14581467{ TORStrings }
     
    22362245  //if Items.Count > 0 then SetFocusIndex(TopIndex);  // this seems to cause problems
    22372246  //Fix For ClearQuest: HDS00001576
     2247  //This fix has been commented out, becuase it causes problems
    22382248{  if (Items.Count > 0) and (Not IsAMouseButtonDown()) and (ItemIndex = -1) then
    22392249    SetFocusIndex(TopIndex);//ItemIndex := TopIndex; }
     
    38633873  //FEditBox.SelectAll;
    38643874  //Fix For ClearQuest: HDS00001576
    3865   {Commented out the fix for CQ: 1576, always selecing first item is
    3866    causing issues.}
     3875  //This fix has been commented out, becuase it causes problems
    38673876{  with FListBox do
    38683877  if (Items.Count > 0) and (Not IsAMouseButtonDown()) and (ItemIndex = -1) then
     
    38723881    //Calling keyUp after key down creates a better mimic of a Keystroke.
    38733882    FwdKeyUp(Self,key,[]);   //fixes clearquest: HDS00001418
    3874   end; }
     3883  end;              }
    38753884  inherited DoEnter;
    38763885  PostMessage(Handle, UM_GOTFOCUS, 0, 0)
     
    64766485{ TCaptionListBox }
    64776486
     6487procedure TCaptionListBox.DoEnter;
     6488begin
     6489  inherited;
     6490  if HintOnItem then
     6491    FHoverItemPos := -1; //CQ: 7178 & 9911 - used as last item index for ListBox
     6492end;
     6493
    64786494function TCaptionListBox.GetCaption: string;
    64796495begin
     
    65126528  else
    65136529    inherited;
     6530end;
     6531
     6532procedure TCaptionListBox.WMMouseMove(var Message: TWMMouseMove);
     6533var
     6534  i : integer;
     6535begin
     6536  inherited;
     6537  //CQ: 7178 & 9911 - FHoverItemPos should be set to -1 in OnEnter
     6538  //Make the TListBox's hint contain the contents of the listbox Item the mouse is currently over
     6539  if HintOnItem then
     6540  begin
     6541    i := ItemAtPos(Point(Message.XPos, Message.YPos), true);
     6542    if i <> FHoverItemPos then
     6543      Application.CancelHint;
     6544    if i = -1 then
     6545      Hint := ''
     6546    else
     6547      Hint := Items[i];
     6548    FHoverItemPos := i;
     6549  end;
    65146550end;
    65156551
     
    68116847
    68126848end.
    6813 
    6814 
    6815 
Note: See TracChangeset for help on using the changeset viewer.