当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.SetScrollAdjustments方法代码示例

本文整理汇总了C#中Gtk.SetScrollAdjustments方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.SetScrollAdjustments方法的具体用法?C# Gtk.SetScrollAdjustments怎么用?C# Gtk.SetScrollAdjustments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk的用法示例。


在下文中一共展示了Gtk.SetScrollAdjustments方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReplaceChild

		protected override void ReplaceChild (Gtk.Widget oldChild, Gtk.Widget newChild)
		{
			Widget ww = Widget.Lookup (oldChild);
			if (ww != null && ww.ShowScrollbars && ParentWrapper != null) {
				// The viewport is bound to the child widget. Remove it together with the child
				ParentWrapper.ReplaceChild (Wrapped, newChild, false);
				return;
			}
			
			if (scrolled.Child is Gtk.Viewport && oldChild != scrolled.Child) {
				Gtk.Viewport vp = (Gtk.Viewport)scrolled.Child;
				vp.Remove (oldChild);
				scrolled.Remove (vp);
				vp.Destroy ();
			}
			else
				scrolled.Remove (scrolled.Child);
			
			if (newChild.SetScrollAdjustments (null, null))
				scrolled.Add (newChild);
			else
				AddWithViewport (newChild);
			
			NotifyChildAdded (scrolled.Child);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:25,代码来源:ScrolledWindow.cs

示例2: ReplaceChild

		protected override void ReplaceChild (Gtk.Widget oldChild, Gtk.Widget newChild)
		{
			Widget ww = Widget.Lookup (oldChild);
			if ((oldChild is Placeholder) && (ParentWrapper is ScrolledWindow) && newChild.SetScrollAdjustments (null, null)) {
				Widget wrapper = Widget.Lookup (newChild);
				wrapper.ShowScrollbars = false;
				ParentWrapper.ReplaceChild (Wrapped, newChild, false);
			} else if (ww != null && ww.ShowScrollbars && (ParentWrapper is ScrolledWindow) && ParentWrapper.ParentWrapper != null) {
				// The viewport is bound to the child widget. Remove it together with the child
				ParentWrapper.ParentWrapper.ReplaceChild (ParentWrapper.Wrapped, newChild, false);
			} else
				base.ReplaceChild (oldChild, newChild);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:13,代码来源:Viewport.cs

示例3: ReloadModes

        private void ReloadModes(ref Gtk.Layout vbox)
        {
            options.Clear();
            if (channel != null)
            {
                RefreshBans();
                ReloadExceptions();
                RefreshInvites();

                lock (channel.ChannelMode)
                {
                    int height = 0;
                    foreach (char item in channel._Network.SModes)
                    {
                        if (channel.ChannelMode._Mode.Contains(item.ToString()))
                        {
                            InsertMode(item, ref vbox, ref height);
                        }
                    }
                    foreach (char item in channel._Network.XModes)
                    {
                        if (channel.ChannelMode._Mode.Contains(item.ToString()))
                        {
                            InsertMode(item, ref vbox, ref height);
                        }
                    }
                    foreach (char item in channel._Network.CModes)
                    {
                        InsertMode(item, ref vbox, ref height);
                    }
                    Adjustment ad = new Adjustment(0, 0, height * 100, 10, 20, 20);
                    vbox.SetScrollAdjustments(new Adjustment(10, 0, 10, 10, 10, 10), ad);
                    this.GtkScrolledWindow1.SetScrollAdjustments(new Adjustment(10, 0, 10, 10, 10, 10), ad);
                    vbox.Height = (uint)height;
                }
            }
        }
开发者ID:JGunning,项目名称:OpenAIM,代码行数:37,代码来源:ChannelInfo.cs


注:本文中的Gtk.SetScrollAdjustments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。