[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
2496.0. "List Box Probles (VMS 5.3)" by CESARE::ALMONDO () Thu Mar 22 1990 06:20
Hello,
I have a problem with the list box widget on VMS 5.3-1.
The list box appears on the screen but , when the items are added the
scroll bar change but no items are displayed.
The same code run correctly if compiled on a 5.2 VMS or on ULTRIX.
Mario Almondo
CIM-Int. Engineering
Turin (Italy)
Thanks in advance.
the following is the code used to add the items :
/********************************************************************
* *
* AddLine function : *
* Add a New Line on a list box widget. *
* *
* Parameters : *
* *
* w (Widget) Widget id of the ListBox. *
* txt (char *) text to be added. *
* pos (int) position for insertion * *********************************************************************/
static void AddLine(w,txt,pos)
Widget w;
char *txt;
int pos;
{
DwtCompString list_txt;
list_txt = DwtLatin1String(txt);
DwtListBoxAddItem(w,list_txt,pos);
XtFree(list_txt);
}
......
if (!count) {
if ((ret = DwtFetchWidget (s_DRMHierarchy,
SHOW_WIDGET,toplevel,
&widgets[k_list_popup],
&class)) != DRMSuccess )
{
printf("error creating %s widget\n",LIST_WIDGET);
return(-1);
}
txt = DwtLatin1String("list box widget tester");
SetValue(widgets[k_var_name_lab],DwtNlabel,txt);
XtManageChild(widgets[k_show_box]);
}
else
{
sprintf(str,"list element number %d",count);
AddLine(widgets[k_list_list],str,0);
}
.......
Widget is created usin the following uil; definition :
.....
value
FIXED_SPC : font('-DEC-Terminal-Bold-R-Normal--14-140-75-75-C-8-ISO8859-1');
object
show_box : popup_attached_db {
arguments {
title = k_showbox_title;
default_vertical_offset = 4;
default_horizontal_offset = 4;
};
controls {
label name_label;
list_box elements_list;
push_button return_but;
};
callbacks {
create = procedure creation (k_list_popup);
};
};
object
name_label : label {
arguments {
adb_top_attachment = DwtAttachAdb;
adb_top_offset = 10;
adb_left_attachment = DwtAttachAdb;
adb_right_attachment = DwtAttachAdb;
label_label = label_name;
};
callbacks {
create = procedure creation (k_var_name_lab);
};
};
object
elements_list : list_box {
arguments {
width = 300;
visible_items_count = 5;
create_horizontal_scroll_bar = true;
single_selection = true;
font_argument = FIXED_SPC;
margin_height = 5;
margin_width = 5;
adb_top_attachment = DwtAttachWidget;
adb_top_widget = label var_name_label;
adb_left_attachment = DwtAttachAdb;
};
callbacks {
single = procedure selection (k_list_box);
create = procedure creation (k_list_box);
};
};
T.R | Title | User | Personal Name | Date | Lines
|
---|