Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Regular Contributor
Posts: 79
Registered: ‎09-17-2012
My Device: Torch 9800

Questions regarding Custom Dialog Box

Hi all. 

 

Is it possible to add scrollbars to custome dialog box? Is there anyway to do so using JavaScript? 

 

I tried to test using the sample from the API

 

function dialogCallBack2(index)
{
  alert(index);
}

function btnTest2()
{
  try
  {
   var question = "Test Question test questionn";
   question += "Test Question test question Test Question test question Test Question test question";
   question += "Test Question test question Test Question test question Test Question test question";
   question += "Test Question test question Test Question test question Test Question test question";
   question += "Test Question test question Test Question test question Test Question test question";
   question += "Test Question test question Test Question test question Test Question test question";
   question += "Test Question test question Test Question test question Test Question test question";
   var buttons = ["Yes", "No", "Sometimes", "NA"];
   var ops = { title: "Choose the answer that describes you best", size : blackberry.ui.dialog.SIZE_MEDIUM, position : blackberry.ui.dialog.CENTER };
   blackberry.ui.dialog.customAskAsync(question, buttons, dialogCallBack2, ops);
  }
  catch(e)
  {
    alert("Exception in customeDialog: " + e );
  }
}

 Is there anyway create scrollbar on the side of the dialog box? 

 

And also is it possible to change to the color of the dialog box using JavaScript? 

 

Thank you. 

BlackBerry Development Advisor
Posts: 626
Registered: ‎10-01-2009
My Device: Z10

Re: Questions regarding Custom Dialog Box

Hello,

 

I believe the answer to both of your questions is no.  Perhaps by creating a custom extension you could modify some aspects of the dialog, but I don't know about scroll bars, or the colour.

 

You may want to look in to creating your own 'modal' box with HTML/CSS/JavaScript. A quick Google search will return lots of different examples.

 

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro