Announcement

Collapse
No announcement yet.

DBLookupComboBox Problem beim scrollen...

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DBLookupComboBox Problem beim scrollen...

    hallo, <br>
    <br>
    ich habe das folgende problem mit lookupcomboboxen:<br>
    öffne ich die combobox und will dann durch die geöffnete liste<br>
    mit meiner logitech-scrollmaus scrollen, stürtzt das programm ab.<br>
    ist dies ein bug, oder mache ich etwas falsch?<br>
    kann man dies umgehen?
    <br><br>
    vielen dank im vorraus.<br>
    andik

  • #2
    Hallo,

    welche Delphi-Version wird eingesetzt? Wenn es sich um Delphi 5 handelt, wurde auch das <b>UpdatePack#1</b> von Delphi 5 eingespielt? Die Originalversion hatte ein Problem mit bestimmten Scrollmaus-Treibern

    Comment


    • #3
      hallo andreas,<br><br>

      es wird delphi 5 enterprise mit update-pack #1 eingesetzt.<br>
      bei den mäusen handelt es sich primär um logitech-mäuse <br>
      mit der treiberversion 8 u. 9.<br>
      das problem tritt auf, sobald das lookup "gepopupt" wurde <br>
      und man in der geöffneten liste scrollen will.<br>
      danach geht gar nix mehr. allerdings kann man das programm-<br>
      fenster noch bewegen, allerdings kann man es nicht beenden und <br>
      auch sonst nix damit machen.<br>
      andi

      Comment


      • #4
        Hallo,

        ich würde nachsehen, ob die in dem folgenden <b>Tech Alert</b> von Borland dokumentierten Probleme auch für die eigene Konfiguration zutreffen:
        <pre>
        I. Current Tech Alerts
        =================================================
        Product: Delphi
        Version: 5.0
        Description: Conflict between latest InteliMouse
        driver and TDBLookupComboBox.
        Severity: Serious/Highly Visible
        Steps to Reproduce:
        Install InteliMouse Driver v2.2d.
        Create or open an application which uses a
        TDBLookupComboBox. Click on the arrow in the
        box to show the drop down list. Now move the
        mouse wheel, and the application freezes.
        The application must be killed to recover.
        This issue does not occur with a TComboBox
        (TDBLookupComboBox is not a TComboBox descendent).
        Workaround:
        A permanent solution to this issue is currently
        in development. Here is a workaround which
        requires adding a couple lines to DBCTRLS.PAS:
        { This part takes care of the AV. ListLink.DataSet
        could be nil after the WM_MOUSEWHEEL wasn't
        handled and the Intellimouse driver decided to
        send a WM_VSCROLL }
        procedure TDBLookupListBox.WMVScroll(var Message: TWMVScroll);
        begin
        SearchText := '';
        <<<< ADD >>>>
        if ListLink.DataSet = nil then Exit;
        <<<< END ADD >>>>
        with Message, ListLink.DataSet do
        case ScrollCode of
        SB_LINEUP: MoveBy(-FRecordIndex - 1);
        SB_LINEDOWN: MoveBy(FRecordCount - FRecordIndex);
        SB_PAGEUP: MoveBy(-FRecordIndex - FRecordCount+ 1);
        SB_PAGEDOWN: MoveBy(FRecordCount - FRecordIndex+ FRecordCount - 2);
        SB_THUMBPOSITION:
        begin
        case Pos of
        0: First;
        1: MoveBy(-FRecordIndex - FRecordCount + 1);
        2: Exit;
        3: MoveBy(FRecordCount - FRecordIndex + FRecordCount - 2);
        4: Last;
        end;
        end;
        SB_BOTTOM: Last;
        SB_TOP: First;
        end;
        end;
        { This takes care of the "hang". For some unknown
        reason, the control gets a WM_KILLFOCUS immediately
        after the *second* WM_MOUSEWHEEL. I wasn't able to
        determine where the message came from. However,
        focus is retained by the drop-down list, making it
        appear that the application had stopped responding }
        procedure TDBLookupComboBox.CloseUp(Accept: Boolean);
        var
        Msg: TMsg;
        ListValue: Variant;
        begin
        if FListVisible then
        begin
        if GetCapture <> 0 then SendMessage(GetCapture,WM_CANCELMODE, 0, 0);
        <<<< ADD >>>>
        SetFocus;
        <<<< END ADD >>>>
        ListValue := FDataList.KeyValue;
        SetWindowPos(FDataList.Handle, 0, 0, 0, 0, 0, SWP_NOZORDERor
        SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATEor SWP_HIDEWINDOW);
        FListVisible := False;
        FDataList.ListSource := nil;
        Invalidate;
        SearchText := '';
        if Accept and CanModify then SelectKeyValue(ListValue);
        if Assigned(FOnCloseUp) then FOnCloseUp(Self);
        end;
        end;
        </pre&gt

        Comment


        • #5
          danke, erst mal für die antwort. die problembeschreibung trifft <br>
          schon auf mein problem zu. die zwei routinen sind in meiner vcl <br>
          bereits auf o. g. stand. das problem tritt aber dennoch auf.<br>
          andi

          Comment


          • #6
            Hallo,

            wenn das Projekt inklusive Debug-DCUs (VCL-Units) compiliert und schrittweise ausgeführt wird, an welcher Stelle knallt es

            Comment


            • #7
              hallo, <br>
              <br>
              schwer zu sagen, da nach dem fehler nicht an die stelle des vcl-<br>quelltextes gesprungen wird. wenn ich dass programm mit f8 weiter<br> treibe kommt es irgendwann mal wieder in den vordergrund<br>
              aber mit grauen, deaktivierten titelleisten (sowohl mdimain, und <br>mdichild). die fenster lassen sich auch noch problemlos bewegen, aber man kann sonst eben nix mehr machen. wenn ich dann auf f8 bleibe<br> kommt es irgendwann nicht mehr aus einer schleife heraus,
              dies ist laut cpu-fenster bei: forms.pas 6732. ob das normal ist weiss ich nicht.<br> komische sache!
              andi

              Comment

              Working...
              X