sub showWrongMessage()
m.Message = createObject("RoSGNode","Dialog")
bg = createFullScreenBg()
m.Message.insertchild(bg,0)
m.Message.titleColor = "0xff0000ff"
m.Message.title = "TRY AGAIN"
m.Message.message = "You did something wrong:" + chr(10) + "* message on second line " + chr(10) + "* message on third line "
m.Message.buttons = ["OK"]
m.Message.observefield("buttonSelected","closeMessageonOK")
m.Message.observefield("wasClosed","DialogClosed")
m.top.dialog = m.Message
end sub
sub createFullScreenBg() As Object
bg = createObject("roSGNode", "Rectangle")
bg.height = 1080
bg.width = 1920
bg.color = "0x00000044"
return bg
end sub
"This allows the appearance attributes of all the Button nodes in the dialog to be easily modified. Since the ButtonGroup node class is derived from the LayoutGroup node class, additional non-Button node children can also be added."
I have the same issue with how to set a button group inside a dialog box. Do you have any luck?
Here is an example of how I've set a button group in a dialog. Hopefully this is what you are looking for:
The code defines a dialog control in the XML:
<Dialog
id="ControlDialog"
visible="false"
/>
Then in the brs file, it accesses the control, creates a group of buttons and sets the focus bitmap:
m.top.ControlDialog = m.top.findNode("ControlDialog")
m.top.ControlDialog.buttonGroup.buttons = [tr("BUTTON1"), tr("BUTTON2"), tr("BUTTON3")]
m.top.ControlDialog.buttonGroup.focusBitmapUri="pkg:/images/Button_Blue_HD.9.png"
@RobMichThank you for your response, It's working. Is it possible to change the focused text color?. I tried with "focusedTextColor" like below. But no luck.
' optiondialog.focusedTextColor = "0xFFFFFFFF" 'nonexistent field ' optiondialog.ButtonGroup.focusedTextColor = "0xFFFFFFFF"
For the keyboard dialog box, the "focusedKeyColor" field is Works. But, It's only available for alphabet and digit. Is there any option available for focused text color in the dialog box?
@chaklasiyanikun wrote:@RobMichThank you for your response, It's working. Is it possible to change the focused text color?. I tried with "focusedTextColor" like below. But no luck.
' optiondialog.focusedTextColor = "0xFFFFFFFF" 'nonexistent field ' optiondialog.ButtonGroup.focusedTextColor = "0xFFFFFFFF"For the keyboard dialog box, the "focusedKeyColor" field is Works. But, It's only available for alphabet and digit. Is there any option available for focused text color in the dialog box?
Any Solution for this.