本文整理汇总了C++中DBGridIF::ValueString方法的典型用法代码示例。如果您正苦于以下问题:C++ DBGridIF::ValueString方法的具体用法?C++ DBGridIF::ValueString怎么用?C++ DBGridIF::ValueString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBGridIF
的用法示例。
在下文中一共展示了DBGridIF::ValueString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw
void UIAttribView::Draw (DBObjRecord *record)
{
DBObjTableField *field;
DBObjectLIST<DBObjTableField> *fields;
UIXYGraphShell *graphCLS;
if (record == (DBObjRecord *) NULL)
{
Cardinal i, numChildren;
WidgetList rowCols;
UIAuxSetLabelString (ItemNameWGT,(char *) "");
XtVaGetValues (FieldsRowCol,XmNchildren, &rowCols, XmNnumChildren, &numChildren,NULL);
for (i = 0;i < numChildren; ++i)
XmTextFieldSetString (XtNameToWidget (rowCols [i],"UIAttribViewTextField"),(char *) "");
return;
}
UIAuxSetLabelString (ItemNameWGT,record->Name ());
switch (DataPTR->Type ())
{
case DBTypeVectorPoint:
case DBTypeVectorLine:
case DBTypeVectorPolygon:
case DBTypeGridDiscrete:
fields = ItemTable->Fields ();
for (field = fields->First ();field != (DBObjTableField *) NULL;field = fields->Next ())
if (DBTableFieldIsVisible (field) == true) DrawField (field->Name (),field->String (record));
break;
case DBTypeGridContinuous:
{
DBCoordinate coord = *((DBCoordinate *) (record->Data ()));
DBGridIF *gridIF = new DBGridIF (DataPTR);
for (record = ItemTable->First ();record != (DBObjRecord *) NULL;record = ItemTable->Next ())
DrawField (record->Name (),gridIF->ValueString (record,coord));
delete gridIF;
} break;
case DBTypeNetwork:
{
DBObjTable *cellTable = DataPTR->Table (DBrNCells);
DBObjTableField *basinFLD = cellTable->Field (DBrNBasin);
DBObjRecord *basinRec;
if ((basinRec = ItemTable->Item (basinFLD->Int (record) - 1)) == (DBObjRecord *) NULL)
{ CMmsgPrint (CMmsgAppError, "BasinID Error in:%s %d",__FILE__,__LINE__); return; }
DrawField ((char *) "Basin Name",basinRec->Name ());
fields = ItemTable->Fields ();
for (field = fields->First ();field != (DBObjTableField *) NULL;field = fields->Next ())
if (DBTableFieldIsVisible (field) == true) DrawField (field->Name (),field->String (basinRec));
fields = cellTable->Fields ();
for (field = fields->First ();field != (DBObjTableField *) NULL;field = fields->Next ())
if (DBTableFieldIsVisible (field) == true) DrawField (field->Name (),field->String (record));
} break;
default: break;
}
if ((graphCLS = (UIXYGraphShell *) DataPTR->Display (UIXYGraphShellStr)) != (UIXYGraphShell *) NULL)
graphCLS->Configure (record);
}