日历 [英] Calendar
问题描述
我想在网格中构建一个显示一个月内所有日子的日历,所以
当我点击代表一个月中某一天的方块的标题时,我>
可以添加一个新的会议等。我知道.net提供了一个日历控件但是
一个不是我想要的。我希望我的callendar填写整个表格并且
只显示一个月。
我想建立这样的东西:
>
+ --------------- +
| 8 __________ |单元格标题,显示日期,点击它显示弹出菜单
添加会议
| |
| |细胞体,允许输入一些文字
+ --------------- +
这是一个显示第8个单元格当月的一天。
我的问题是最好的方法是什么?什么控制好?
创建日历网格?数据网格?面板? ...
任何帮助将不胜感激,
-
Dino Buljubasic
软件开发人员
http://rivusglobal.com
I''d like to build a calendar displaying all days in a month in a grid so
that when I click on the header of a square representing a day of month, I
can add a new meeting etc. I know that .net provides a calendar control but
that one is not what I want. I want my callendar to fill whole form and
display only one month.
I would like to build someting like this:
+---------------+
| 8__________| cell header, shows day, clicking on it shows pop up menu
to add a meeting
| |
| | cell body, allows entering some text
+---------------+
This is one cell showing 8th day of the current month.
My question is what would be best way to do this? What control is good to
create calendar grid? A data grid? Panels? ...
Any help will be appreciated,
--
Dino Buljubasic
Software Developer
http://rivusglobal.com
推荐答案
嗨Dino,
我从未这样做过,但我会选择动态构建
直接在表格上收集平面样式按钮。
非常容易处理。
Cor
Hi Dino,
I have never done this, but I would just choose for dynamicly built
collection of flat style buttons direct on a form.
Very easy to handle.
Cor
如何添加日期编号,按钮标题(可以添加新任务,
会议等)和按钮正文(可以输入一些文本)?
谢谢
-
Dino Buljubasic
软件开发人员
http://rivusglobal.com
" Cor" < no*@non.com>在消息中写道
news:3f *********************** @ reader22.wxs.nl ...
How to add the day number, the button header(to be able to add new task,
meeting, etc) and button body (to be able to enter some text)?
Thanks
--
Dino Buljubasic
Software Developer
http://rivusglobal.com
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader22.wxs.nl...
嗨Dino,
我从来没有这样做,但我会选择直接在表格上动态构建的平面样式按钮集合。
非常容易处理。 /> Cor
Hi Dino,
I have never done this, but I would just choose for dynamicly built
collection of flat style buttons direct on a form.
Very easy to handle.
Cor
你好迪诺
我做了日历,
你可以将它粘贴在新表格的代码中。
它制作一个日历(它只适用于2003年10月,但改变那个日期
当然没什么)。
当你看到它时,我认为要添加其他按钮将很容易
为你。
(例如你可以在哪里我用一个选择案例测试显示消息框是什么
是状态和必须做什么约会
\\\
Private mybutton(31)As Button
Private Sub Form1_Load(ByVal sender As Object,_
ByVal e As System.EventArgs)Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
对于i = 0 To System.DateTime.DaysInMonth(2003,10) - 1
mybutton(i)= New Button
mybutton(i).TextAlign = ContentAlignment。 MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle。平面
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start,top)
mybutton(i).Text =(i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add (mybutton(i))
AddHandler mybutton(i)。点击,AddressOf mybutton_Click
start = start + 40
If(i + 1 )Mod 5 = 0然后
top = top + 20
start = 4
结束如果
下一步< br $>
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object,ByVal e As System.EventArgs)
Dim month As Button = DirectCast(发件人,按钮)
MessageBox.Show(" The day is:" &安培; month.Text)
结束子
结束课
///
我希望这有点帮助
Cor
Hi Dino
I did make the calender,
You can paste it in the code from a new form.
It makes a calender (it works only for october 2003, but changing that date
is of course nothing).
When you see it, I think to add that to add the other buttons will be easy
for you.
(By example you can where I show the messagebox with a select case test what
is the status and what appointment has to be done)
\\\
Private mybutton(31) As Button
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
For i = 0 To System.DateTime.DaysInMonth(2003, 10) - 1
mybutton(i) = New Button
mybutton(i).TextAlign = ContentAlignment.MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle.Flat
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start, top)
mybutton(i).Text = (i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add(mybutton(i))
AddHandler mybutton(i).Click, AddressOf mybutton_Click
start = start + 40
If (i + 1) Mod 5 = 0 Then
top = top + 20
start = 4
End If
Next
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim month As Button = DirectCast(sender, Button)
MessageBox.Show("The day is: " & month.Text)
End Sub
End Class
///
I hope this helps a little bit
Cor
这篇关于日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!