Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

 

In date/Time widget i can use the image strip to draw my own up/down image strip, but by default it will come to only active Field, is it possible to set for all fields  and if i draw date widget by default slash (/) will come between the fields, is there any way to restric that, means i don't want slash between the Fields,

 

-Hanu

Up/Down arrows are drawn only for selected field. You can use IWidget_SetDelimiterString() to specify delimiter string (default is /) of your choice.

Up/Down arrows are drawn only for selected field. You can use IWidget_SetDelimiterString() to specify delimiter string (default is /) of your choice.

Hi,
 
is it possible to give more distance between the fields in date/time widget.

Hi,
 
is it possible to give more distance between the fields in date/time widget.

You can use IWidget_SetFieldPad() but padding will be displayed around each side of the bounding rectangle of the field text. If you want padding only between fields then provide spaces in delimiter string set using  IWidget_SetDelimiterString().

You can use IWidget_SetFieldPad() but padding will be displayed around each side of the bounding rectangle of the field text. If you want padding only between fields then provide spaces in delimiter string set using  IWidget_SetDelimiterString().

Thanks its working , and one thing i can get the date and time using IWidget_GetAEEDateTime but if want to set my own date in date widget how to do that.

Thanks its working , and one thing i can get the date and time using IWidget_GetAEEDateTime but if want to set my own date in date widget how to do that.

Get value model attached to julian date/time widget and set the value.
IValueModel *pDateModel;AEEDateTime date;
IWidget_GetModel(me->piwDate, AEEIID_IValueModel, (IModel**)(void**)&pDateModel));IValueModel_SetValue(pDateModel, (void*)&date, sizeof(date), 0);

Get value model attached to julian date/time widget and set the value.
IValueModel *pDateModel;AEEDateTime date;
IWidget_GetModel(me->piwDate, AEEIID_IValueModel, (IModel**)(void**)&pDateModel));IValueModel_SetValue(pDateModel, (void*)&date, sizeof(date), 0);

after setting the custom date, how to reset the date/time widget. i.e how to get the initial date/time value before setting the custom values.

after setting the custom date, how to reset the date/time widget. i.e how to get the initial date/time value before setting the custom values.

Get value from model.
date = (AEEDateTime*)IValueModel_GetValue(pDateModel, NULL);

Get value from model.
date = (AEEDateTime*)IValueModel_GetValue(pDateModel, NULL);

i tried with that, its not resetting. I'm getting the values which i setted before. here is the snippet
{
AEEDateTime date_buf;
IValueModel *pivm = 0;
AEEDateTime *pDateTime;

IWidget_GetAEEDateTime(piDateWidget,&date_buf);
date_buf.wMonth=12;
date_buf.wYear = 1987;
date_buf.wDay = 11;
IWidget_GetModel(piDateWidget, AEEIID_IValueModel, (IModel **)(void *)&pivm);
IValueModel_SetValue(pivm,(void *)&date_buf,sizeof(date_buf),NULL);
IWidget_SetModel(piDateWidget,(IModel *)pivm);
IWidget_GetAEEDateTime(piDateWidget,&date_buf);
pDateTime = (AEEDateTime *)IValueModel_GetValue(pivm, NULL);
IValueModel_Release(pivm);
}

i tried with that, its not resetting. I'm getting the values which i setted before. here is the snippet
{
AEEDateTime date_buf;
IValueModel *pivm = 0;
AEEDateTime *pDateTime;

IWidget_GetAEEDateTime(piDateWidget,&date_buf);
date_buf.wMonth=12;
date_buf.wYear = 1987;
date_buf.wDay = 11;
IWidget_GetModel(piDateWidget, AEEIID_IValueModel, (IModel **)(void *)&pivm);
IValueModel_SetValue(pivm,(void *)&date_buf,sizeof(date_buf),NULL);
IWidget_SetModel(piDateWidget,(IModel *)pivm);
IWidget_GetAEEDateTime(piDateWidget,&date_buf);
pDateTime = (AEEDateTime *)IValueModel_GetValue(pivm, NULL);
IValueModel_Release(pivm);
}

Do you want to reset the value to original (default) value? If yes, store the original value and set it using IValueModel_SetValue.
 
No need of IWidget_SetModel as you are using default model and not custom model.

Do you want to reset the value to original (default) value? If yes, store the original value and set it using IValueModel_SetValue.
 
No need of IWidget_SetModel as you are using default model and not custom model.

Ok, thanks its working

Ok, thanks its working

Hi
how to set for current date and time ???
Thanks in advance

Hi
how to set for current date and time ???
Thanks in advance

By default it gives current date/time..right?
Otherwise, You can use GETJULIANDATE or ISHELL_GetJulianDate and related helpers to get the current date/time.

By default it gives current date/time..right?
Otherwise, You can use GETJULIANDATE or ISHELL_GetJulianDate and related helpers to get the current date/time.

once if i set custom values to date widget, at any time if i use _GetAEEDateTime it will return custom values which i setted, and what i want is after setting any custom values i have to reset the the date/Time widget such that i have to get the current date or time

once if i set custom values to date widget, at any time if i use _GetAEEDateTime it will return custom values which i setted, and what i want is after setting any custom values i have to reset the the date/Time widget such that i have to get the current date or time

One way is to save the current value by getting it using _GetAEEDateTime before setting custom value. Then whenever you want to reset the value, use saved value.
Otherwise, Get current date/time using  GETJULIANDATE or ISHELL_GetJulianDate and related helpers and set it to value model to reset it.

One way is to save the current value by getting it using _GetAEEDateTime before setting custom value. Then whenever you want to reset the value, use saved value.
Otherwise, Get current date/time using  GETJULIANDATE or ISHELL_GetJulianDate and related helpers and set it to value model to reset it.