Beispiel #1
0
		public FontSelectorSample ()
		{
			FontSelector sel = new FontSelector ();
			sel.PreviewText = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy";
			Label preview = new Label ("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy");
			preview.Ellipsize = EllipsizeMode.End;

			sel.FontChanged += (sender, e) => preview.Font = sel.SelectedFont;

			PackStart (sel);
			PackStart (new HSeparator());
			PackStart (preview);
		}
Beispiel #2
0
        public DefaultSelectFontDialogBackend(WindowFrame parentWindow)
        {
            parent = parentWindow;

            fontDialog        = new Dialog();
            fontDialog.Width  = 500;
            fontDialog.Height = 300;

            VBox box = new VBox();

            fontSelector              = new FontSelector();
            fontSelector.FontChanged += (sender, e) => SelectedFont = fontSelector.SelectedFont;
            box.PackStart(fontSelector, true);

            fontDialog.Content = box;

            fontDialog.Buttons.Add(new DialogButton(Command.Cancel));
            fontDialog.Buttons.Add(new DialogButton(Command.Ok));
        }
Beispiel #3
0
		public DefaultSelectFontDialogBackend (WindowFrame parentWindow)
		{
			parent = parentWindow;

			fontDialog = new Dialog ();
			fontDialog.Width = 500;
			fontDialog.Height = 300;

			VBox box = new VBox ();
			fontSelector = new FontSelector ();
			fontSelector.FontChanged += (sender, e) => SelectedFont = fontSelector.SelectedFont;
			box.PackStart (fontSelector, true);

			fontDialog.Content = box;

			fontDialog.Buttons.Add (new DialogButton (Command.Cancel));
			fontDialog.Buttons.Add (new DialogButton (Command.Ok));
		}