本文整理汇总了C#中ScintillaNet.ScintillaControl.PointXFromPosition方法的典型用法代码示例。如果您正苦于以下问题:C# ScintillaControl.PointXFromPosition方法的具体用法?C# ScintillaControl.PointXFromPosition怎么用?C# ScintillaControl.PointXFromPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScintillaNet.ScintillaControl
的用法示例。
在下文中一共展示了ScintillaControl.PointXFromPosition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PositionControl
public void PositionControl(ScintillaControl sci)
{
// compute control location
Point p = new Point(sci.PointXFromPosition(memberPos), sci.PointYFromPosition(memberPos));
p = ((Form)PluginBase.MainForm).PointToClient(((Control)sci).PointToScreen(p));
toolTip.Left = p.X + sci.Left;
bool hasListUp = !CompletionList.Active || CompletionList.listUp;
if (currentLine > sci.LineFromPosition(memberPos) || !hasListUp) toolTip.Top = p.Y - toolTip.Height + sci.Top;
else toolTip.Top = p.Y + UITools.Manager.LineHeight(sci) + sci.Top;
// Keep on control area
if (toolTip.Right > ((Form)PluginBase.MainForm).ClientRectangle.Right)
{
toolTip.Left = ((Form)PluginBase.MainForm).ClientRectangle.Right - toolTip.Width;
}
toolTip.Show();
toolTip.BringToFront();
}
示例2: CallTipShow
static public void CallTipShow(ScintillaControl sci, int position, string text)
{
toolTip.Visible = false;
isActive = true;
Text = text;
AutoSize();
// position
startPos = position+text.IndexOf('(')+1;
currentPos = sci.CurrentPos;
currentLine = sci.LineFromPosition(currentPos);
Point p = new Point(sci.PointXFromPosition(position), sci.PointYFromPosition(position));
p = ((Form)UITools.MainForm).PointToClient(((Control)sci).PointToScreen(p));
toolTip.Left = p.X + sci.Left;
if (currentLine > sci.LineFromPosition(position)) toolTip.Top = p.Y-toolTip.Height + sci.Top;
else toolTip.Top = p.Y+UITools.LineHeight(sci) + sci.Top;
toolTip.Show();
toolTip.BringToFront();
UITools.LockControl(sci); // lock keys
}