三角形状复选框(ButtonStyle) [英] Triangular Shape Checkbox (ButtonStyle)

查看:70
本文介绍了三角形状复选框(ButtonStyle)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法制作一个三角形的复选框(按钮样式)

形?

Is there a way to make a checkbox (button style) that is triangular
shaped?

推荐答案

Jess ,


你好奇,为什么?


Cor


< Je ** @ aol.comschreef在bericht

新闻:ci ******************************** @ 4ax.com ...
Jess,

You make mu curious, why?

Cor

<Je**@aol.comschreef in bericht
news:ci********************************@4ax.com...

有没有办法制作一个三角形的复选框(按钮样式)

形状?
Is there a way to make a checkbox (button style) that is triangular
shaped?



我想创建一个钻石形状按钮,它包含一个左边的

右上角和按钮部分(4个三角形)切换。

周六,2007年1月27日20:36:09 +0100,Cor Ligthert [MVP]

< no * ***********@planet.nlwrote:
I wand to create a diamond shape button that has consists of a left
right top and button segment (4 triangles) that toggles.
On Sat, 27 Jan 2007 20:36:09 +0100, "Cor Ligthert [MVP]"
<no************@planet.nlwrote:

> Jess,

你好奇,为什么?

< Je ** @ aol.comschreef在bericht
新闻:ci ************** ******************@4ax.com ..
>Jess,

You make mu curious, why?

Cor

<Je**@aol.comschreef in bericht
news:ci********************************@4ax.com.. .

>有没有办法制作一个三角形的复选框(按钮样式)?
>Is there a way to make a checkbox (button style) that is triangular
shaped?


每个段切换都是如此(即每个控件上有四个开/关盒)?


如果是这样的话,你可以使用一种方法。您可以继承

复选框类并添加一个属性,该属性包含

三角形所在的位置(左,右,顶部或底部)。然后,在它'覆盖

paint方法引用该属性并根据它返回的值绘制相应的图像

(我会使用枚举和开关

语句)然后将这个自定义复选框中的四个添加到您的用户

控件,设置新的位置属性,并将它们拖到您所在的位置

需要它们在控制上。剩下的就是创建控件可能需要的任何

属性。


我希望自那以后(它已经很晚了)这里:-))

谢谢,


Seth Rowe

1月27日下午3:33, J ... @ aol.com写道:
So does each segment toggle (i.e. four on/off boxes on each control)?

If so here''s one method you could use. You could just inherit the
checkbox class and add a property that holds which position the
triangle is in (left, right, top, or bottom). Then, in it''s overriden
paint method reference that property and draw the appropriate image
based on the value it returns (I would use an enum and a switch
statement) Then add four of this custom check box to your user
control, set the new position property, and drag them to where you
need them on the control. All that would be left is to create any
properties you might need for the control.

I hope that made since (it''s getting pretty late here :-) )

Thanks,

Seth Rowe
On Jan 27, 3:33 pm, J...@aol.com wrote:

我用魔杖创建一个由左边组成的钻石形状按钮

右上方切换的按钮段(4个三角形)。


2007年1月27日星期六20:36:09 +0100,Cor Ligthert [MVP]


< notmyfirstn ... @ planet.nlwrote:
I wand to create a diamond shape button that has consists of a left
right top and button segment (4 triangles) that toggles.

On Sat, 27 Jan 2007 20:36:09 +0100, "Cor Ligthert [MVP]"

<notmyfirstn...@planet.nlwrote:

Jess,
Jess,


你好奇,为什么?
You make mu curious, why?


Cor
Cor


< J ... @ aol。 comschreef in bericht

news:ci ******************************** @ 4ax.com ...
<J...@aol.comschreef in bericht
news:ci********************************@4ax.com...

有没有办法制作一个三角形的复选框(按钮样式)

塑造?
Is there a way to make a checkbox (button style) that is triangular
shaped?


这篇关于三角形状复选框(ButtonStyle)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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