mramim
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2021
11:01 PM
Fixed width-height Scenegraph Button
I want to populate a button with image coming from API, i've set the minWidth and maxWidth to be "64" but whenever I populate the iconUri with image from server, the button just grows in size. How can I prevent this?
2 REPLIES 2


Community Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2021
09:03 PM
Re: Fixed width-height Scenegraph Button
Hi @mramim,
Can you provide the XML/BrightScript code for your Button node.
mramim
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021
01:36 PM
Re: Fixed width-height Scenegraph Button
Sure, I've a button group that holds multiple buttons with different ids, and they all have a placeholder iconUri and focusedIconUri, my intention is to change these icons with a network Image that I receive from the API(that image is not always 64px)
<ButtonGroup> .... <Button id="id1" minWidth="64" maxWidth="64" height="64" text="" focusBitmapUri="pkg:/images/transparent.9.png" focusFootprintBitmapUri="pkg:/images/transparent.9.png" iconUri="pkg:/images/2_quality.png" focusedIconUri="pkg:/images/2_quality.png" /> ... </ButtonGroup>
On the brightscript side of the code, I've a task that loads info from api and then I just try to set the field
m.btn1.iconUri = m.top.response.apiImage m.btn1.focusedIconUri = m.top.response.apiImage
Let me know if you need any other information.