void AddExtraControl(ProjectConfigurationControl control) { var extraRow = new ExtraControlTableRow { Row = projectConfigurationTable.NRows, Label = new Label(control.Label ?? string.Empty) { Xpad = 5, Xalign = 1, Justify = Justification.Left }, MainWidget = (Widget)control }; CreateTooltip(control, extraRow); AddExtraControl(extraRow); }
void CreateTooltip(ProjectConfigurationControl control, ExtraControlTableRow extraRow) { if (string.IsNullOrEmpty(control.InformationTooltip)) { return; } var hbox = new HBox(); var paddingEventBox = new EventBox(); paddingEventBox.ModifyBg(StateType.Normal, leftHandBackgroundColor); hbox.PackStart(paddingEventBox, true, true, 0); var tooltipEventBox = new EventBox { HeightRequest = 16, WidthRequest = 16, VisibleWindow = false }; hbox.PackStart(tooltipEventBox, false, false, 0); extraRow.InformationTooltipWidget = hbox; extraRow.InformationTooltip = CreateTooltip(tooltipEventBox, control.InformationTooltip); }
void CreateTooltip (ProjectConfigurationControl control, ExtraControlTableRow extraRow) { if (string.IsNullOrEmpty (control.InformationTooltip)) return; var hbox = new HBox (); var paddingEventBox = new EventBox (); paddingEventBox.ModifyBg (StateType.Normal, leftHandBackgroundColor); hbox.PackStart (paddingEventBox, true, true, 0); var tooltipEventBox = new EventBox { HeightRequest = 16, WidthRequest = 16, VisibleWindow = false }; hbox.PackStart (tooltipEventBox, false, false, 0); extraRow.InformationTooltipWidget = hbox; extraRow.InformationTooltip = CreateTooltip (tooltipEventBox, control.InformationTooltip); }
void AddExtraControl (ProjectConfigurationControl control) { var extraRow = new ExtraControlTableRow { Row = projectConfigurationTable.NRows, Label = new Label (control.Label ?? string.Empty) { Xpad = 5, Xalign = 1, Justify = Justification.Left }, MainWidget = (Widget)control }; CreateTooltip (control, extraRow); AddExtraControl (extraRow); }