Struct native_windows_gui::DatePicker
[−]
[src]
pub struct DatePicker { /* fields omitted */ }
A simple date picker control. Do not handle timezone. It is recomended to use a specialized date time library to use with this control.
Methods
impl DatePicker
[src]
fn set_format<S: Clone + Into<String>>(&self, format: &S)
Set the format of the date time picker. Use the format specified in the DTP template.
fn get_checkstate(&self) -> CheckState
Return the check state of the checkbox of the control (if optional was set to true).
If the date time picker is not optional, return false.
fn get_value(&self) -> Option<PickerDate>
Return the time set in the control in a PickerDate
structure.
Return None if optional
was set and the checkbox is not checked.
Note: use get_date_string
to get the text value of the control.
fn set_value(&self, date: &Option<PickerDate>)
Set the time set in the control in a PickerDate
structure.
If None
is passed, clears the checkbox.
fn get_align(&self) -> HTextAlign
Get the alignment of the calendar popup. For some reason, it is impossible to retrive the TextEdit handle, therefore getting its alignment is impossible.
fn set_align(&self, align: &HTextAlign)
Change the alignment of the calendar popup. For some reason, it is impossible to retrive the TextEdit handle, therefore setting its alignment is impossible.
fn close_calendar(&self)
Close the calendar popup if it is open
fn get_value_string(&self) -> String
fn get_visibility(&self) -> bool
fn set_visibility(&self, visible: bool)
fn get_position(&self) -> (i32, i32)
fn set_position(&self, x: i32, y: i32)
fn get_size(&self) -> (u32, u32)
fn set_size(&self, w: u32, h: u32)
fn get_enabled(&self) -> bool
fn set_enabled(&self, e: bool)
Trait Implementations
impl Control for DatePicker
[src]
fn handle(&self) -> AnyHandle
Should return the underlying handle to the object
fn control_type(&self) -> ControlType
Should return the type of the control. For custom controls, the return value should be Undefined
(the default).
fn free(&mut self)
If specified, should free any ressource allocated in the template build
function. This includes functions like DestroyWindow
.