<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic StaticTextMouseMoved is not called. in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223576#M2242</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;I was created simple UI with static text. And I want to do anything when cursor moves on the text, but the function StaticTextMouseMoved is not calling. Could you tell me if I do anything wrong?
&lt;PRE&gt;class PluginAvailabilityManagementDialog : public DG::ModalDialog,
  public DG::PanelObserver,
  public DG::ButtonItemObserver,
  public DG::CompoundItemObserver,
  public DG::StaticTextObserver
{
public:
  PluginAvailabilityManagementDialog(GSResModule dialResModule);
  ~PluginAvailabilityManagementDialog();

private:
  virtual void PanelOpened(const DG::PanelOpenEvent&amp;amp; ev) override;
  virtual void ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev) override;
  virtual void  StaticTextClicked(const DG::StaticTextClickEvent&amp;amp; ev) override;
  virtual void  StaticTextDoubleClicked(const DG::StaticTextDoubleClickEvent&amp;amp; ev) override;
  virtual void  StaticTextMouseMoved(const DG::StaticTextMouseMoveEvent&amp;amp; ev, bool* noDefaultCursor) override;

  static const short PLUGIN_AVAILABILITY_MANAGEMENT_DIALOG_RESID = 32530;
  enum
  {
    LaterButtonID = 2,
    UpdateNowButtonID = 5,
    NewFeaturesButtonID = 6,
    textID = 3,
  };

  DG::Button laterButton_;
  DG::Button updateNowButton_;
  DG::Button newFeaturesButton_;
  DG::LeftText leftText_;
};&lt;/PRE&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;PluginAvailabilityManagementDialog::PluginAvailabilityManagementDialog(GSResModule dialResModule) :
    DG::ModalDialog(dialResModule, PLUGIN_AVAILABILITY_MANAGEMENT_DIALOG_RESID, dialResModule),
    laterButton_(GetReference(), LaterButtonID),
    updateNowButton_(GetReference(), UpdateNowButtonID),
    newFeaturesButton_(GetReference(), NewFeaturesButtonID),
  leftText_(GetReference(), textID)
{
    AttachToAllItems(*this);
}

PluginAvailabilityManagementDialog::~PluginAvailabilityManagementDialog()
{
}

void PluginAvailabilityManagementDialog::PanelOpened(const DG::PanelOpenEvent&amp;amp; ev)
{
}

void PluginAvailabilityManagementDialog::ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev)
{
}

void PluginAvailabilityManagementDialog::StaticTextClicked(const DG::StaticTextClickEvent&amp;amp; ev)
{

}

void PluginAvailabilityManagementDialog::StaticTextDoubleClicked(const DG::StaticTextDoubleClickEvent&amp;amp; ev)
{
  leftText_.SetTextColor(Gfx::Color::Green);
}

void PluginAvailabilityManagementDialog::StaticTextMouseMoved(const DG::StaticTextMouseMoveEvent&amp;amp; ev, bool* noDefaultCursor)
{
  DG::InformationAlert("Called","","OK");
}
&lt;/PRE&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;/* ---------------------------------------------------------- Dialog */
'GDLG' 32530 Modal 40 40 445 561 "Dialog" {
/* [ 1] */ Icon  0 0 445 55 10018
/* [ 2] */ Button  141 412 160 44 LargePlain "Later"
/* [ 3] */ LeftText  110 115 223 19 LargeBold "Text"
/* [ 4] */ LeftText  121 150 201 28 LargePlain vCenter "Text center"
/* [ 5] */ Button  141 481 160 25 LargeUnderline noFrame BevelEdge "Update now"
/* [ 6] */ Button  141 170 160 25 LargeUnderline noFrame BevelEdge "features"
}
&lt;/PRE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:20:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-14T07:20:21Z</dc:date>
    <item>
      <title>StaticTextMouseMoved is not called.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223576#M2242</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I was created simple UI with static text. And I want to do anything when cursor moves on the text, but the function StaticTextMouseMoved is not calling. Could you tell me if I do anything wrong?
&lt;PRE&gt;class PluginAvailabilityManagementDialog : public DG::ModalDialog,
  public DG::PanelObserver,
  public DG::ButtonItemObserver,
  public DG::CompoundItemObserver,
  public DG::StaticTextObserver
{
public:
  PluginAvailabilityManagementDialog(GSResModule dialResModule);
  ~PluginAvailabilityManagementDialog();

private:
  virtual void PanelOpened(const DG::PanelOpenEvent&amp;amp; ev) override;
  virtual void ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev) override;
  virtual void  StaticTextClicked(const DG::StaticTextClickEvent&amp;amp; ev) override;
  virtual void  StaticTextDoubleClicked(const DG::StaticTextDoubleClickEvent&amp;amp; ev) override;
  virtual void  StaticTextMouseMoved(const DG::StaticTextMouseMoveEvent&amp;amp; ev, bool* noDefaultCursor) override;

  static const short PLUGIN_AVAILABILITY_MANAGEMENT_DIALOG_RESID = 32530;
  enum
  {
    LaterButtonID = 2,
    UpdateNowButtonID = 5,
    NewFeaturesButtonID = 6,
    textID = 3,
  };

  DG::Button laterButton_;
  DG::Button updateNowButton_;
  DG::Button newFeaturesButton_;
  DG::LeftText leftText_;
};&lt;/PRE&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;PluginAvailabilityManagementDialog::PluginAvailabilityManagementDialog(GSResModule dialResModule) :
    DG::ModalDialog(dialResModule, PLUGIN_AVAILABILITY_MANAGEMENT_DIALOG_RESID, dialResModule),
    laterButton_(GetReference(), LaterButtonID),
    updateNowButton_(GetReference(), UpdateNowButtonID),
    newFeaturesButton_(GetReference(), NewFeaturesButtonID),
  leftText_(GetReference(), textID)
{
    AttachToAllItems(*this);
}

PluginAvailabilityManagementDialog::~PluginAvailabilityManagementDialog()
{
}

void PluginAvailabilityManagementDialog::PanelOpened(const DG::PanelOpenEvent&amp;amp; ev)
{
}

void PluginAvailabilityManagementDialog::ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev)
{
}

void PluginAvailabilityManagementDialog::StaticTextClicked(const DG::StaticTextClickEvent&amp;amp; ev)
{

}

void PluginAvailabilityManagementDialog::StaticTextDoubleClicked(const DG::StaticTextDoubleClickEvent&amp;amp; ev)
{
  leftText_.SetTextColor(Gfx::Color::Green);
}

void PluginAvailabilityManagementDialog::StaticTextMouseMoved(const DG::StaticTextMouseMoveEvent&amp;amp; ev, bool* noDefaultCursor)
{
  DG::InformationAlert("Called","","OK");
}
&lt;/PRE&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;/* ---------------------------------------------------------- Dialog */
'GDLG' 32530 Modal 40 40 445 561 "Dialog" {
/* [ 1] */ Icon  0 0 445 55 10018
/* [ 2] */ Button  141 412 160 44 LargePlain "Later"
/* [ 3] */ LeftText  110 115 223 19 LargeBold "Text"
/* [ 4] */ LeftText  121 150 201 28 LargePlain vCenter "Text center"
/* [ 5] */ Button  141 481 160 25 LargeUnderline noFrame BevelEdge "Update now"
/* [ 6] */ Button  141 170 160 25 LargeUnderline noFrame BevelEdge "features"
}
&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:20:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223576#M2242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-14T07:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: StaticTextMouseMoved is not called.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223577#M2243</link>
      <description>For performance reasons mouse move events are not called by default. Try to enable it on your control by calling the below function in your dialog's constructor:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;myStaticText.EnableMouseMoveEvent ();
&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Aug 2021 13:02:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223577#M2243</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-08-20T13:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: StaticTextMouseMoved is not called.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223578#M2244</link>
      <description>Thanks a lot. It's work!!!
&lt;BLOCKQUOTE&gt;Viktor wrote:&lt;BR /&gt;
For performance reasons mouse move events are not called by default. Try to enable it on your control by calling the below function in your dialog's constructor:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;myStaticText.EnableMouseMoveEvent ();
&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 20 Aug 2021 13:09:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223578#M2244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-20T13:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: StaticTextMouseMoved is not called.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223579#M2245</link>
      <description>When I hover over the text, the StaticTextMouseMoved event is called, when I move the cursor from the text, no events are called. Are there any events for such a case?&lt;BR /&gt;
For example: &lt;BR /&gt;
When the cursor is over the text, the text turns red. When the cursor is not over the text, the text will be blue.
&lt;BLOCKQUOTE&gt;Viktor wrote:&lt;BR /&gt;
For performance reasons mouse move events are not called by default. Try to enable it on your control by calling the below function in your dialog's constructor:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;myStaticText.EnableMouseMoveEvent ();
&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 20 Aug 2021 13:27:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/StaticTextMouseMoved-is-not-called/m-p/223579#M2245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-20T13:27:35Z</dc:date>
    </item>
  </channel>
</rss>

