Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chaklasiyanikun
Roku Guru

Is there any way to set Dialog Box Focus in Roku.

All RSG components have used in the same field For Focus Color is "focusBitmapUri". But, In the dialog box, I tried with the Same field. But no luck. Is there any way or other field to Set Dialog Box Focus Color Change?

0 Kudos
2 REPLIES 2
speechles
Roku Guru

Re: Is there any way to set Dialog Box Focus in Roku.

You cannot set focus on the dialog. I mean you can, but it won't have a built-in method to show it.

Do you mean focus on the buttongroup within the dialog?

m.top.ButtonGroup.focusBitmapUri = "pkg:/images/focus/customfocus.9.png"

Do you mean the 9 patch focus indicator on the buttons? You can adjust the button group within the dialog to adjust its attributes.

0 Kudos
chaklasiyanikun
Roku Guru

Re: Is there any way to set Dialog Box Focus in Roku.

I haven't experimented with "buttonGroup" inside a dialog box. How to add buttonGroup in the dialog box? An example of this is available. It's same as normal button or It's different things? My Dialog Box like below.

sub showdialog()
   optiondialog = CreateObject("roSGNode", "Dialog")
   optiondialog.backgroundUri = "pkg:/images/background.png"
   optiondialog.title = "Dialog"
   optiondialog.buttons = ["OK", "Cancle"] 'Here, I set one button or multiple button here.
  'm.top.ButtonGroup.focusBitmapUri = "pkg:/images/Focus.png"
  'optiondialog.buttons.focusBitmapUri = "pkg:/images/Focus.png"
  'm.top.dialog.focusBitmapUri = "pkg:/images/Focus.png"
   m.top.dialog = optiondialog
end sub

In my case, all other components work with png files. I tried with 9 patch images But no luck. So, I used a png file for all Component.

0 Kudos