<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Hilaire,<br>
    <br>
    Any news wrt this? I need to reproduce your exact scenario to
    understand better.<br>
    <br>
    Thanks!<br>
    <br>
    On 3/3/2022 9:05 AM, Juan Vuletich via Cuis-dev wrote:
    <blockquote cite="mid:6220AF0A.1080709@zoho.com" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <title></title>
      Hi Hilaire,<br>
      <br>
      I can not give a quick and easy solution. This is complex stuff!<br>
      <br>
      What I need is detailed instructions to build your exact setup. I
      guess it involves updated Cuis, and DrGeo. If those instructions
      are in the readme of DrGeo repo, that's even better.<br>
      <br>
      Then, I'll need to play a bit with this and review the code. My
      gut feeling is that DropDownListMorph should not have any
      modal-specific code. That should be in the base framework. Having
      a concrete example to experiment with will help me find out the
      best way to do it.<br>
      <br>
      Thanks!<br>
      <br>
      On 3/3/2022 6:34 AM, Hilaire Fernandes via Cuis-dev wrote:
      <blockquote
        cite="mid:02f2875a-b049-907f-49e4-8a96d5ac9ab2@drgeo.eu"
        type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <p><font size="4">Hi, <br>
          </font></p>
        <p><font size="4">A few weeks ago I posted about how to make a
            DropDownListMorph modal. I fixed the issue by borrowing the
            code from popup menu (it is modal behavior).<br>
          </font></p>
        <p><font size="4">So to pop up my drop down list of morph, I
            have this method:<br>
          </font></p>
        <pre><font size="4">PluggableDropDownListOfMorph>>popUpAt: position forHand: hand in: aWorld
    aWorld addMorphFront: self position: position.
    self fitInWorld.
    prevKbdFocus _ hand keyboardFocus.
    prevMouseFocus _ hand mouseFocus.
    hand newMouseFocus: self;
        newKeyboardFocus: self
</font></pre>
        <p><br>
        </p>
        <p>The modal behavior is perfectly achieved. However, the scroll
          morph in the list morph does not receive event anymore (but it
          is part of the . Observe on the screenshot below, the
          scrollbar is not highlight how it should be:</p>
        <img moz-do-not-send="false"
          src="cid:part1.01060901.07060301@zoho.com" alt="" height="217"
          width="202">
        <p><br>
        </p>
        <p>When I click on the scroll bar, the event is directed to the
          list of morphs (colored boxes), of course it produces an error
          as it does not match with any morph of the list (colored
          boxes). So I edit a bit the method below to handle the mouse
          up button event. Now It makes the scrollbar slider and buttons
          inoperable by the user, only it can be controlled with the
          mouse scrolling wheel button.<br>
        </p>
        <p>The related mouse button up event is handled as:<br>
        </p>
        <pre>mouseButton1Up: aMouseButtonEvent localPosition: localEventPosition
        "Handle a mouse up event."
        (self includesPixel: aMouseButtonEvent eventPosition) 
                ifFalse: [
                        self deleteIfPopUp: aMouseButtonEvent.
                        self activeHand 
                                newKeyboardFocus: prevKbdFocus;
                                newMouseFocus: prevMouseFocus.
                        ^ self ]. 
        "No click outside, handle normally"
        (scrollBar      includesPixel: aMouseButtonEvent eventPosition)
                ifTrue: [scrollBar mouseButton1Up: aMouseButtonEvent localPosition: localEventPosition]
                ifFalse: [super mouseButton1Up: aMouseButtonEvent localPosition: localEventPosition].
        aMouseButtonEvent hand newMouseFocus: self

</pre>
        <p>A workable solution is to override mouseButtonXUp: methods to
          set back the focus and to dispatch manualy the mouse event to
          the scrollbar. It is a bit overkill. I don't know how to
          handle the situation more properly.<br>
        </p>
        <p>Ideas?</p>
        <p>Hilaire<br>
        </p>
        <pre class="moz-signature" cols="72">-- 
GNU Dr. Geo
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://patents.justia.com/inventor/juan-manuel-vuletich">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
@JuanVuletich</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a class="moz-txt-link-freetext" href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a>
<a class="moz-txt-link-freetext" href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a class="moz-txt-link-freetext" href="https://patents.justia.com/inventor/juan-manuel-vuletich">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
@JuanVuletich</pre>
  </body>
</html>