CrossPlatform GUI Programming with wxWidgets [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

CrossPlatform GUI Programming with wxWidgets [Electronic resources] - نسخه متنی

Julian Smart; Kevin Hock; Stefan Csomor

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید











  • Numbers and Dates


    The current locale is also used for formatting numbers and dates. The printf-based formatting in wxString takes care of this automatically. Consider this snippet:


    wxString::Format(wxT("%.1f") , myDouble);

    Here, Format uses the correct decimal separator. And for date formatting:


    wxDateTime t = wxDateTime::Now();
    wxString str = t.Format();

    Format presents the current date and time in the correct language and format. Have a look at the API documentation to see all the possibilities for passing a format description to the Format calljust don't forget that you will probably have to translate this format string as well for using it in a different language because the sequence for different parts of the date can differ among languages.

    If you want to add the correct thousands separator or just want to know the correct character for the decimal point, you can ask the locale object for the corresponding strings using the GetInfo method:


    wxString info = m_locale.GetInfo(wxLOCALE_THOUSANDS_SEP,
    wxLOCALE_CAT_NUMBER) ;


  • / 261