m_menuWidget = (WXWidget) XmCreatePulldownMenu ((Widget) m_formWidget,
"choiceMenu", NULL, 0);
- // int i;
if (n > 0)
{
int i;
#endif
#endif
+ wxSize bestSize = GetBestSize();
+ if( size.x > 0 ) bestSize.x = size.x;
+ if( size.y > 0 ) bestSize.y = size.y;
+
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
ChangeFont(FALSE);
AttachWidget (parent, m_buttonWidget, m_formWidget,
- pos.x, pos.y, size.x, size.y);
+ pos.x, pos.y, bestSize.x, bestSize.y);
ChangeBackgroundColour();
{
XtVaSetValues ((Widget) m_buttonWidget, XmNmenuHistory, w, NULL);
Widget label = XmOptionButtonGadget ((Widget) m_buttonWidget);
- XmString text = XmStringCreateSimple ((char*) (const char*) item);
+ wxXmString text( item );
XtVaSetValues (label,
- XmNlabelString, text,
+ XmNlabelString, text(),
NULL);
- XmStringFree (text);
}
m_stringList.Add(item);
m_noStrings ++;
void wxChoice::Clear()
{
m_stringList.Clear ();
- int i;
+ size_t i;
for (i = 0; i < m_noStrings; i++)
{
XtRemoveCallback((Widget) m_widgetArray[i],
#if 0
Dimension selectionWidth, selectionHeight;
#endif
- wxXmString text( (char*)node->Data() );
+ wxXmString text( node->GetData() );
// MBN: this seems silly, at best, and causes wxChoices to be clipped:
// will remove "soon"
#if 0
if (width > -1)
{
- int i;
+ size_t i;
for (i = 0; i < m_noStrings; i++)
XtVaSetValues ((Widget) m_widgetArray[i],
XmNwidth, actualWidth,
}
if (height > -1)
{
- int i;
+ size_t i;
for (i = 0; i < m_noStrings; i++)
XtVaSetValues ((Widget) m_widgetArray[i],
XmNheight, actualHeight,
DoChangeBackgroundColour(m_formWidget, m_backgroundColour);
DoChangeBackgroundColour(m_buttonWidget, m_backgroundColour);
DoChangeBackgroundColour(m_menuWidget, m_backgroundColour);
- int i;
+ size_t i;
for (i = 0; i < m_noStrings; i++)
DoChangeBackgroundColour(m_widgetArray[i], m_backgroundColour);
}
DoChangeForegroundColour(m_formWidget, m_foregroundColour);
DoChangeForegroundColour(m_buttonWidget, m_foregroundColour);
DoChangeForegroundColour(m_menuWidget, m_foregroundColour);
- int i;
+ size_t i;
for (i = 0; i < m_noStrings; i++)
DoChangeForegroundColour(m_widgetArray[i], m_foregroundColour);
}