<?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 Macro to change Button ID in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394344#M489243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to dynamically add a button to my Qlikview page using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set newbutton = ActiveDocument.ActiveSheet.CreateButton&lt;/P&gt;&lt;P&gt;set prop = newbutton.GetProperties&lt;/P&gt;&lt;P&gt;prop.Text.v = "Remove"&lt;/P&gt;&lt;P&gt;newbutton.SetProperties prop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The button gets added correctly but the trouble I am having is trying to set the ID of this new object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also create a new text object and using the API I found that it is very easy to set the ID of this type of object using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set mytext = ActiveDocument.ActiveSheet.CreateTextObject&lt;/P&gt;&lt;P&gt;prop = mytext.GetProperties&lt;/P&gt;&lt;P&gt;prop.Layout.Frame.ObjectId = "Document\NewID"&lt;/P&gt;&lt;P&gt;prop.Layout.Text.v = Tot&lt;/P&gt;&lt;P&gt;mytext.SetProperties prop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a similar way of doing the above for a button?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2012 13:44:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-30T13:44:15Z</dc:date>
    <item>
      <title>Macro to change Button ID</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394344#M489243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to dynamically add a button to my Qlikview page using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set newbutton = ActiveDocument.ActiveSheet.CreateButton&lt;/P&gt;&lt;P&gt;set prop = newbutton.GetProperties&lt;/P&gt;&lt;P&gt;prop.Text.v = "Remove"&lt;/P&gt;&lt;P&gt;newbutton.SetProperties prop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The button gets added correctly but the trouble I am having is trying to set the ID of this new object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also create a new text object and using the API I found that it is very easy to set the ID of this type of object using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set mytext = ActiveDocument.ActiveSheet.CreateTextObject&lt;/P&gt;&lt;P&gt;prop = mytext.GetProperties&lt;/P&gt;&lt;P&gt;prop.Layout.Frame.ObjectId = "Document\NewID"&lt;/P&gt;&lt;P&gt;prop.Layout.Text.v = Tot&lt;/P&gt;&lt;P&gt;mytext.SetProperties prop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a similar way of doing the above for a button?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 13:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394344#M489243</guid>
      <dc:creator />
      <dc:date>2012-11-30T13:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change Button ID</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394345#M489244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, do it with a text object and assign an action to it. The only differences between buttom and text object is that the button does a little go down effect when you click on it and that it shows engraved text where there is no action assign to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 13:54:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394345#M489244</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2012-11-30T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change Button ID</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394346#M489245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Technically: For button Frame object can be accessed directly from properties not from Layout.&lt;/P&gt;&lt;P&gt;Check with this&lt;/P&gt;&lt;P&gt;prop.Frame.ObjectId="Your Dynamic ID"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 14:22:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394346#M489245</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-11-30T14:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change Button ID</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394347#M489246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you this is just what I was after!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 15:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-change-Button-ID/m-p/394347#M489246</guid>
      <dc:creator />
      <dc:date>2012-11-30T15:34:24Z</dc:date>
    </item>
  </channel>
</rss>

