[Mono-winforms-list] CommonDialog.DialogForm.owner field

Peter Dennis Bartok peter@novonyx.com
Tue, 28 Dec 2004 15:15:59 -0700


I have implemented the HelpButton property in Form. I also implemented the 
support for it in Control.cs. The HelpRequested event is now raised as 
required. (I hope you weren't gonna handle the WM_HELP event yourself) and 
you can tie into that to get the request.

The patch you sent was different for every single line of the file which 
made it pretty unusable. You might want to check your patches before sending 
them (the zipped version wasn't any better).

On your font question, I don't have any context, where your 'style' variable 
comes from (and why it is an int instead of type FontStyle), but your 
example was missing brackets, and possibly a cast, depending on the type of 
'style':

If 'style' is of type 'int':
int style = 0;
....
if ((style & (int)FontStyle.Bold) != 0) {
 ....
}

If 'style' is of type 'FontStyle'
FontStyle style = FontStyle.Regular;
....
if ((style & FontStyle.Bold) != 0) {
 ....
}

Cheers,
  Peter

-----Original Message-----
From: "Aleksandar Dezelin" <dezelin32@fastmail.fm>
To: "Peter Dennis Bartok" <peter@novonyx.com>
Cc: <mono-winforms-list@lists.ximian.com>
Date: 28 December, 2004 05:57
Subject: Re: [Mono-winforms-list] CommonDialog.DialogForm.owner field


>Peter Dennis Bartok wrote:
>>>Could it be protected instead of the current private protection level?
>>
>>
>> Absolutely. Changed in svn head.
>>
>> Cheers,
>>   Peter
>>
>
>Here is a small patch to Form.cs that adds HelpButton property for
>displaying the help button in the form title. I've added HelpButton
>property, one 'bool' field and changed underlying CreateParams method to
>  set the WS_EX_CONTEXTHELP window style. I need this patch for
>implementation of the FontDialog which will come very soon.
>
>Another question:
>I want to make a string from the variable of the FontStyle type but when
>I want to check if FontStyle.Bold is included with 'if (style &
>FontStyle.Bold != 0) { blah blah; }' compiler gives me an error that it
>cannot cast FontStyle enum type to int. How should I check if
>FontStyle.Bold and other styles are included?
>
>Cheers,
>Aleksandar Dezelin
>
>-- 
>Linux is like wigwham - no windows, no gates, and apache inside...
>