Remove the usage of deprecated Button APIS
[platform/core/uifw/dali-demo.git] / examples / text-field / text-field-example.cpp
index 1b21b48..70e7e7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
 #include <iostream>
 #include <dali/public-api/events/touch-point.h>
@@ -86,8 +87,8 @@ public:
   PushButton CreateFolderButton()
   {
     PushButton button = PushButton::New();
-    button.SetUnselectedImage( FOLDER_ICON_IMAGE );
-    button.SetSelectedImage( FOLDER_OPEN_ICON_IMAGE );
+    button.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, FOLDER_ICON_IMAGE );
+    button.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, FOLDER_OPEN_ICON_IMAGE );
     button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
     button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
     ImageDimensions imageSize = ResourceImage::GetImageSize( FOLDER_ICON_IMAGE );