+ if(!strHandle)
+ return;
+
+ char* str = (char*) MemHandleLock( strHandle );
+ if(str==NULL)
+ return;
+
+ strcpy(str, label.c_str());
+ MemHandleUnlock(strHandle);
+ FldSetTextHandle(field, strHandle);
+ FldRecalculateField(field, true);
+}
+
+void wxControl::SetControlLabel(const wxString& label)
+{
+ ControlType* control = (ControlType*)GetObjectPtr();
+ if(control==NULL)
+ return;
+ CtlSetLabel(control, "");
+ m_label = label;
+ if(!m_label.empty())
+ CtlSetLabel(control,m_label.c_str());
+}
+
+void wxControl::SetLabel(const wxString& label)
+{
+ if(IsPalmField())
+ SetFieldLabel(label);
+
+ // unlike other native controls, slider has no label
+ if(IsPalmControl() && !wxDynamicCast(this,wxSlider))
+ SetControlLabel(label);
+}
+
+wxString wxControl::GetFieldLabel()
+{
+ FieldType* field = (FieldType*)GetObjectPtr();
+ if(field==NULL)
+ return wxEmptyString;
+ return FldGetTextPtr(field);