please check this code:

'''
BEGIN GPL LICENSE BLOCK
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
END GPL LICENCE BLOCK
'''
bl_info = {
"name": "test properties",
"author": "Diego Quevedo ( http://doshape.com/ )",
"version": (1, 0),
"blender": (2, 7 , 3),
"location": "View3D > EditMode > ToolShelf",
"description": "test properties ",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Mesh"}
import bpy, sys, math
from bpy.props import (StringProperty,
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
EnumProperty,
PointerProperty,
)
from bpy.types import (Panel,
Operator,
AddonPreferences,
PropertyGroup,
)
class testOperador(bpy.types.Operator):
bl_idname = 'ops.test'
bl_label = 'test'
bl_description = ""
bl_options = {'REGISTER', 'UNDO'}
test1 = bpy.props.BoolProperty(
name="test_properties after execution",
default= False
)
def main(self, context):
print("hello")
@classmethod
def poll(self, context):
obj = context.active_object
return all([obj is not None])
def execute(self, context):
self.main(context)
return {'FINISHED'}
class MySettings(PropertyGroup):
x_size = FloatProperty(
name = "x size",
description = "A float property",
default = 23.7,
min = 0.01,
max = sys.float_info.max
)
test = bpy.props.BoolProperty(
name="test",
default= False
)
vertices = bpy.props.BoolProperty(
name="vertices",
default= True
)
class UV_OT_my_panel(Panel):
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_label = "test"
def draw(self, context):
layout = self.layout
scene = context.scene
mytool = scene.my_tool
split = layout.split()
col = split.column()
a= bpy.context.scene.my_tool.x_size
layout.prop(mytool, "x_size", text="x-size")
col.operator(testOperador.bl_idname, text=str(a), icon="COPYDOWN")
############################
split = layout.split()
col = split.column()
b = bpy.context.scene.my_tool.test
row = col.row(align=True)
row.prop(mytool, "test")
if b:
col.operator(testOperador.bl_idname, text="test1", icon="COPYDOWN")
else:
col.operator(testOperador.bl_idname, text="test2", icon="COPYDOWN")
def register():
bpy.utils.register_module(__name__)
bpy.types.Scene.my_tool = PointerProperty(type=MySettings)
def unregister():
bpy.utils.unregister_module(__name__)
del bpy.types.Scene.my_tool
if __name__ == "__main__":
register()