<?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>GUI GuiderのトピックRe: How to Modify Custom.c file ?</title>
    <link>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1697424#M416</link>
    <description>&lt;P&gt;Thank you, it works !! I have one more question related to this topic, I have created 2 pages and I can switch from one to another. When I switch the page and then turn back to the same page, this button we created becomes unvisible. How can I make it visible forever on that page ?&lt;BR /&gt;&lt;BR /&gt;In fact I want to know how to manipulate generated files with custom codes. For example there is a screen and there is a button on that screen built with Gui Guider, how can I change this button's spesifications with custom area files ?&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 13:22:04 GMT</pubDate>
    <dc:creator>frozen</dc:creator>
    <dc:date>2023-08-02T13:22:04Z</dc:date>
    <item>
      <title>How to Modify Custom.c file ?</title>
      <link>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1695938#M410</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I use Gui Guider 1.5.1 and v8.3.2 Lvgl . I want to see something on the screen with my own coded files/objects but I don't know how.&lt;BR /&gt;&lt;BR /&gt;For example, I want to add button with label example. &lt;A href="https://lvgl.io/docs/latest/en/html/get-started/quick-overview.html#button-with-label" target="_self"&gt;Here&lt;/A&gt; this is link and the code piece is below. Could you tell me how to add this code to custom.c/custom.h file and see the result on my screen ?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include "../../lv_examples.h"

static void btn_event_cb(lv_obj_t * btn, lv_event_t event)
{
    if(event == LV_EVENT_CLICKED) {
        static uint8_t cnt = 0;
        cnt++;

        /*Get the first child of the button which is the label and change its text*/
        lv_obj_t * label = lv_obj_get_child(btn, NULL);
        lv_label_set_text_fmt(label, "Button: %d", cnt);
    }
}

/**
 * Create a button with a label and react on Click event.
 */
void lv_ex_get_started_1(void)
{
    lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL);     /*Add a button the current screen*/
    lv_obj_set_pos(btn, 10, 10);                            /*Set its position*/
    lv_obj_set_size(btn, 120, 50);                          /*Set its size*/
    lv_obj_set_event_cb(btn, btn_event_cb);                 /*Assign a callback to the button*/

    lv_obj_t * label = lv_label_create(btn, NULL);          /*Add a label to the button*/
    lv_label_set_text(label, "Button");                     /*Set the labels text*/
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 12:55:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1695938#M410</guid>
      <dc:creator>frozen</dc:creator>
      <dc:date>2023-07-31T12:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Modify Custom.c file ?</title>
      <link>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1696409#M411</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, frozen&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I made some modifications to the code you provided, added it to custom.c, and displayed some contents on the display screen. On the display screen, the button label can be automatically added by clicking the created button. The specific method is as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1、Add the modified code in custom.c&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xu_Zhang_0-1690872282349.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234470iB2AE298C9751A8E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xu_Zhang_0-1690872282349.png" alt="Xu_Zhang_0-1690872282349.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2、Add &lt;/SPAN&gt;&lt;SPAN&gt;“&lt;/SPAN&gt;&lt;SPAN&gt;lv_obj_t * btn&lt;/SPAN&gt;&lt;SPAN&gt;”&lt;/SPAN&gt;&lt;SPAN&gt; to the&lt;/SPAN&gt;&lt;SPAN&gt;“&lt;/SPAN&gt;&lt;SPAN&gt;lv_ui&lt;/SPAN&gt;&lt;SPAN&gt;‘”&lt;/SPAN&gt;&lt;SPAN&gt; structure of the &lt;/SPAN&gt;&lt;SPAN&gt;“&lt;/SPAN&gt;&lt;SPAN&gt;gui_guider.h&lt;/SPAN&gt;&lt;SPAN&gt;”&lt;/SPAN&gt;&lt;SPAN&gt;file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xu_Zhang_1-1690872312283.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234471i3AFD64A5B3BA0383/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xu_Zhang_1-1690872312283.png" alt="Xu_Zhang_1-1690872312283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3、&lt;SPAN&gt;compile and download the code, the effect is as follows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6332222100112w304h540r485" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6332222100112" data-account="6153537070001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6153537070001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6332222100112w304h540r485');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.nxp.com/t5/video/gallerypage/video-id/6332222100112"&gt;（マイビデオを表示）&lt;/a&gt;&lt;/div&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Xu Zhang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 06:47:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1696409#M411</guid>
      <dc:creator>Xu_Zhang</dc:creator>
      <dc:date>2023-08-01T06:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Modify Custom.c file ?</title>
      <link>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1696521#M412</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Xu_Zhang&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your directives. I stuck in 2nd step, I do not have a development kit yet, that's why I work on just gui guider with Simulator. When I add&amp;nbsp;&lt;SPAN&gt;“&lt;/SPAN&gt;&lt;SPAN&gt;lv_obj_t * btn" and then compile it, the file is regenerated and I get compile time error about there is no object as btn. How can I pass this subject ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 08:24:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1696521#M412</guid>
      <dc:creator>frozen</dc:creator>
      <dc:date>2023-08-01T08:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Modify Custom.c file ?</title>
      <link>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1697075#M414</link>
      <description>&lt;P&gt;You can try to unadd "lv_obj_t *btn" in the "gui_guider.h" file earlier, you can add "lv_obj_t *btn" in "custom.c", then save the project and see the effect in the emulator.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xu_Zhang_0-1690943513743.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234631i0E6FD7DCBFC4E569/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xu_Zhang_0-1690943513743.png" alt="Xu_Zhang_0-1690943513743.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xu_Zhang_1-1690943536083.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234632i9E5DBA0BCF0751D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xu_Zhang_1-1690943536083.png" alt="Xu_Zhang_1-1690943536083.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that "guider_ui.btn" was replaced by "btn" in the previous program.&lt;/P&gt;
&lt;P&gt;Xu Zhang&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 02:37:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1697075#M414</guid>
      <dc:creator>Xu_Zhang</dc:creator>
      <dc:date>2023-08-02T02:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Modify Custom.c file ?</title>
      <link>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1697424#M416</link>
      <description>&lt;P&gt;Thank you, it works !! I have one more question related to this topic, I have created 2 pages and I can switch from one to another. When I switch the page and then turn back to the same page, this button we created becomes unvisible. How can I make it visible forever on that page ?&lt;BR /&gt;&lt;BR /&gt;In fact I want to know how to manipulate generated files with custom codes. For example there is a screen and there is a button on that screen built with Gui Guider, how can I change this button's spesifications with custom area files ?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:22:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/How-to-Modify-Custom-c-file/m-p/1697424#M416</guid>
      <dc:creator>frozen</dc:creator>
      <dc:date>2023-08-02T13:22:04Z</dc:date>
    </item>
  </channel>
</rss>

