c#Mono Develop上的用户控制 - 已解决 [英] c# User control on Mono Develop - SOLVED

查看:93
本文介绍了c#Mono Develop上的用户控制 - 已解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用单声道在Linux中移植Windows Form C#应用程序。

我解决了很多问题,但现在我不知道我该做什么。



我无法在linux上使用用户控制



我用了很多用户控件作为带有一些控制的容器

(每个用户控件都是带有一些大按钮的按钮栏)
我需要时显示的




当我在linux上执行应用程序时无法正常工作。



我的所有用户控件(容器)都变得透明..

如果我移动鼠标我看到有一个按钮,因为鼠标光标改变并回答点击但是它是透明的...





任何解决方案?





解决方案

问题不在用户控件中,而是在函数绘制覆盖中。

我创建了一个覆盖,确实设置了一些控件参数(文本大小,syle of文字) nd然后绘制基础油漆

I'm porting a Windows Form C# application in Linux using mono.
I'm solving a lot of problem but now i don't know what i have to do.

I can't use User Control on linux.

I used many user control as container with some control
(each User Control is a button bar with some big button)
that i display when i need.

When i execute the application on linux not work.

all my User Control (container) become transparent..
if i move the mouse i see that there is a button because the mouse cursor change and answer to click but it's trasnparent...


any solution?


SOLUTION
The problem was not in User Controls but in their function paint override.
I created an override that did set some parameters of control (size of text, syle of text) and then drew the base paint

public override paint(..)
...instruction...
base.paint()..





这就产生了问题。

现在我删除了所有指令并且工作正常。

给我这是足够 。对控件的任何更改都不会。



and this created problems.
Now i removed all instruction and it work.
to me this is enough . any changes to the control do otherwise.

推荐答案

解决方案

问题不在用户控件中,而在于他们的功能油漆覆盖。

我创建了一个覆盖,它确实设置了一些控制参数(文本大小,文本大小),然后绘制了基础油漆





SOLUTION
The problem was not in User Controls but in their function paint override.
I created an override that did set some parameters of control (size of text, syle of text) and then drew the base paint


public override paint(..)
...instruction...
base.paint()..





这就产生了问题。

现在我删除了所有指令并且工作正常。
$ b $对我来说这就足够了。否则对控件的任何更改都会发生。



and this created problems.
Now i removed all instruction and it work.
to me this is enough . any changes to the control do otherwise.


这篇关于c#Mono Develop上的用户控制 - 已解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆