Hello,
I would like to put a wallpaper on my form. I use canvas and bitmap class to do that but when I test it, nothing happens. Do you know why?
result
MainForm::OnInitializing(void)
{
result r = E_SUCCESS;
Image img;
Bitmap* pBitmap = null;
Canvas* pCanvas = null;
String filePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/test.png";
img.Construct();
pBitmap = img.DecodeN(filePath, BITMAP_PIXEL_FORMAT_ARGB8888);
if (pBitmap != null)
{
AppLog("OK_Bitmap");
}
pCanvas = GetCanvasN();
if (pCanvas != null)
{
AppLog("OK_Canvas");
}
pCanvas->DrawBitmap(Point(0,0), *pBitmap);
pCanvas->Show();
SetFormBackEventListener(this);
// Get a button via resource ID
Tizen::Ui::Controls::Button *pButtonOk = static_cast<Button*>(GetControl(IDC_BUTTON_OK));
if (pButtonOk != null)
{
pButtonOk->SetActionId(ID_BUTTON_OK);
pButtonOk->AddActionEventListener(*this);
}
return r;
}