Click here to Skip to main content
15,886,104 members
Articles / Programming Languages / C#
Article

PallaControls for Windows forms

Rate me:
Please Sign up or sign in to vote.
4.87/5 (68 votes)
21 Aug 20037 min read 253.7K   3.8K   112   106
Approximately 35 controls for Windows Forms. Some ideas for visual composition and classes of general use.

Sample Image - menulistbox.jpg

Introduction

I program in Delphi since the version 1.0, and in this time, I did create some controls that has given form to how I develop my "programs". They help enough in typical tasks of Windows forms applications (Example: validation). Besides, together with some friends of the university of São Paulo, I developed a pattern of "very private visual" identity (combination of colors, sources and forms).

When I began "to play" with the .NET platform, the first thing that I thought was: " I have to do something similar here". This article is exactly a collection of controls that I developed to use in my Windows forms applications. There are approximately 35 controls!

The .NET community all over the world

Sincerely, if the community formed around the .NET platform didn't exist, I would not know where to begin. Actually, a lot of code was just adapted to do part of this collection. In the section of credits, I mention all developers (that I rememeber ; -)) of whom I took advantage of some thing. To publish this library is the form that I have to thank and to return to the community what I could learn.

Controls

The inspiration, kept the due proportion, it is Money of Microsoft. There is a lot to talk about the controls and the intention.

  • StyleGuide – This control serves as base for the style of most of the other ones. The property PlansOfColors contains the existent patterns.
  • Button – A normal button if not for the property Radius (to round the corners).
  • ImageButton – Another normal button; allows the choice of an image.
  • CheckBoxCheckBox reminds a little of that vineyard in a Borland library that came with Borland C.
  • RadioButton – normal radio button.
  • TextBox – Normal textbox with some interesting properties for validation of the entrance of data:
    • Mask- it presents the validation possibilities; some especially useful to Brazil... (17options).
    • NotAcceptChars - together with Mask.TextWithNotAcceptChars it doesn't allow the entrance of disabled characters.
    • DecimalPlaces
    • DecMaxValue
    • DecMinValue

      The last three are for validation and formation of numbers.

    • Required - the completion of the field is indicated, it is of obligatory completion.
    • ShowErrorProvider - the control is indicated it should exhibit the mistake indication.

    input sample

  • ButtonEdit – Textbox with button on the right side that contains the same properties of TextBox.
  • DatePicker - Component for entrance of dates.
  • ComboBox – Normal combobox if not for the following properties:
    • JustAcceptItems- it only accepts the completion with items of the combo.
    • Mask, Required, ShowErrorProvider - Same as TextBox.
    • AutoFill - it fills out the list with pré-defined items (months, states and etc...) Obs: I am almost sorry for having placed this in the control. Its escapes a lot from the defined patterns for the bind mechanism...
  • GroupBoxPanel, with borders in the extremities, title and possibility of rounding of the corners.
  • MenuListBox – Inspired list box in Money99 that allows shortcut keys, description of the items and definition of an image for the items.
  • InfiniteProgress - infinite progress with gradient effects (pretty good).
  • MessageBox – Component that "imitates" MessageBox contained in System.Windows.Forms. The good thing here is the possibility to use a CheckBox together with the message.

    MessageBox sample

  • DateTimeVisualize – Control "idiot" that I needed for a very private occasion.
  • Label – Normal label if not for the fact of working with StyleGuide.
  • ListBox – Normal list box if not for the fact of working with StyleGuide.
  • OptionButton – Button that works like a RadioButton.
  • SpinEdit – Control for entrance of numbers.
  • XpLine – Line with gradient effects. It "imitates" the lines used in some parts of Windows XP.

    input sample

  • TaskPanelBar – A control that allows the creation of windows in the style of Money99, also...
  • TabbedGroups econtroles “Docking” – Save some adaptations, works exactly as in the library "MagicLibrary of Crownwood Consulting Limited". In fact, what I learned with this library, it was worth books that I bought more than some...; -)
  • Panel – A normal panel, if not for the following properties:
    • PanelType - It says to the control, like him it should be "colored", following the established patterns.

    Message sample

Possible memory leaks

In general, as I have been evidencing in some tests (basically it is true) there are not problems with memory leaks. However, MessageBox.ShowProgressDialog seems, that is draining some thing. My suggestion, in case you want to use this: Test before!!

Bindable controls

Independent in the way like me, I did (I think can quite still get better, nannies that you see the listbox to understand it that phallus), most of the controls work well the bind mechanism.

Credits and gratefulness

As I said before, a lot of things were removed off the community; Here I will mention those that I remember:

  • “MagicLibrary" - "CrownwoodConsulting Limited" (this collection of controls is spectacular and the code is a class on how to write controls for Windows forms)
  • “FlatControls" - "Ivar Lumi" (the first light...; -))
  • "Marcelo Soares" - for the creation of the style "AssGreen" and several critics and suggestions to the library. (Man, sometimes almost hill of rage in our discussions, but I have to recognize, your critics strengthen me and you are very competent).
  • "James T. Johnson" –"TSWizard"
  • “Clovett" - "InfiniteProgress"
  • "Ingo Rammer" –“RemotingHelpers"

I think that is it! I might have forgotten somebody, after all, there are nights after nights in the google, reading posts, articles, lowering sources, testing and etc. In case you see something in this library that seems it was adapted and don't have the due credit, please send me an e-mail so that the mistake can be corrected.

Thanks also to MSDN Brazil's personnel; a community truly strong and disposed to help, whenever necessary. A hug for the personnel of www.desenvolvendo.net, especially to Fábio Galuppo and Rogério Wagner. You don't know the importance about having people like you so "accessible" and always disposed to help. Congratulations for your work!

A special hug for a teacher whom I had more than ten years, "Nilson Nihomatsu" from "Paralelo school". Among other things, he taught me something that I maintained during this whole time: TO LIKE LEARNING!

Finally, if you improve any part of these controls or wants to discuss something related to the sources, feel free to contact me by e-mail.

History

  • Version 1.0 - 07/27/03
    • Initial version
  • Version 1.1 - 07/30/03
    • Corrections
      • RadioButton - Generation of event CheckedChanged. (thanks Stray Bullet)
      • MessageBox (Show method) - Coordinates of the buttons (YesNo, OKCancel)
      • ComboBox - Added property SelectedValue and event SelectedValueChanged. (thanks toticow)
      • GroupBox - Code of the interface IFlashabledControl
    • Improvements
      • ControlBase, PanelBase - Creation and code of the interface IHasStyleControl to facilitate the configuration of style in child controls.
      • Translation of constants' names in the class ResourceLibrary. (thanks Olaf Herrmann, next step is translate the messages)
  • Version 1.2 - 07/31/03
    • Corrections
      • TextBox - Bug with DecimalPlaces property. (thanks Stray Bullet)
      • DatePicker - LostFocus and PopupWindow bug (null ref...). (thanks Piotr Ozaist)
      • InfiniteProgress - Code of the interface IHasStyleControl.
    • Improvements
      • SpinEdit - "Hold the mouse over the arrow button with pressed key does not continue counting" (thanks Olaf Herrmann)
  • Version 1.3 - 08/05/03
    • Corrections
      • TextBox, DatePicker, ButtonEdit, ComboBox, ListBox, MenuListBox - Use DisableColor when the Enabled property is same, the false in designer. (thanks Stray Bullet)
      • GroupBox - Fittings in the drawing of the title. (thanks Stray Bullet)
    • Improvements
      • PallaControls.Resources - (at last!) translation of the messages for English (culture "en"). Still lacks other aspects of individual cultures. (Example: validation of the social insurance number and etc.)
  • Version 1.4 - 08/07/03
    • Corrections
      • Button, CheckBox, RadioButton, GroupBox, OptionButton - Correction of the problem that inverted the colors of the border (BorderHotColor, BorderColor). (thanks JeffGreen)
      • TextBox, DatePicker, ButtonEdit, ComboBox, ListBox, MenuListBox - KeyUp, KeyDown and KeyPress events. (thanks JeffGreen)
      • TextBoxBase - DecMinVal and DecMaxVal bug. (thanks Geri Wolters)
    • Improvements
      • TextBoxBase, Date and Time handlers and validations - "Made it more culture aware and let validation be handled by the DateTime class". (thanks Geri Wolters)
  • Version 1.5 - 08/10/03
    • Improvements
      • TextBoxBase, TextBox, ButtonEdit - Added for Geri Wolters. Custom validation with RegularExpression.
      • StyleGuide - Added for Geri Wolters. Capacity to save and load styles in XML files.
      • StyleGuide - Added style "TweakGreen" created by Stray Bullet.
  • Version 1.6 - 08/23/03
    • Corrections
      • "When adding an Object to the ListBox (Text and Value), I can't get the text to display. I think this is a bug as the MS control worked fine with my code". (thanks JeffGreen)
    • Improvements
      • TextBoxBase, TextBox, ButtonEdit - Added for Geri Wolters. Custom error messages.
  • Version 1.7 - 08/25/03
    • Corrections
      • ControlBase, TextBox, ButtonEdit - GotFocus and LostFocus bugs. (thanks Hzi)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Brazil Brazil
To develop software is the best work of the world!

Comments and Discussions

 
GeneralRe: Only on control Pin
Palladino8-Aug-03 9:08
Palladino8-Aug-03 9:08 
GeneralEnter Key does not register in Keypress/keydown/keyup Pin
JeffGreen8-Aug-03 0:47
JeffGreen8-Aug-03 0:47 
GeneralRe: Enter Key does not register in Keypress/keydown/keyup Pin
Palladino8-Aug-03 8:33
Palladino8-Aug-03 8:33 
GeneralTextBox + ButtonEdit KeyPress Pin
JeffGreen6-Aug-03 22:20
JeffGreen6-Aug-03 22:20 
GeneralRe: TextBox + ButtonEdit KeyPress Pin
Palladino7-Aug-03 4:39
Palladino7-Aug-03 4:39 
GeneralSome improvements here Pin
Geri Wolters6-Aug-03 11:59
Geri Wolters6-Aug-03 11:59 
GeneralRe: Some improvements here Pin
Palladino7-Aug-03 4:04
Palladino7-Aug-03 4:04 
GeneralRe: Some improvements here Pin
Geri Wolters7-Aug-03 5:18
Geri Wolters7-Aug-03 5:18 
GeneralRe: Some improvements here Pin
Palladino7-Aug-03 6:27
Palladino7-Aug-03 6:27 
GeneralRe: Some improvements here Pin
Geri Wolters8-Aug-03 10:54
Geri Wolters8-Aug-03 10:54 
GeneralBorderHotColor Pin
JeffGreen5-Aug-03 23:38
JeffGreen5-Aug-03 23:38 
GeneralRe: BorderHotColor Pin
JeffGreen6-Aug-03 0:05
JeffGreen6-Aug-03 0:05 
GeneralRe: BorderHotColor Pin
Palladino7-Aug-03 4:33
Palladino7-Aug-03 4:33 
GeneralRe: BorderHotColor Pin
Member 4096237-Aug-03 11:30
Member 4096237-Aug-03 11:30 
GeneralRe: BorderHotColor Pin
Palladino8-Aug-03 8:29
Palladino8-Aug-03 8:29 
QuestionScrollBars for ListBox? Pin
TheDesertFoxReborn4-Aug-03 8:56
sussTheDesertFoxReborn4-Aug-03 8:56 
AnswerRe: ScrollBars for ListBox? Pin
Palladino5-Aug-03 12:29
Palladino5-Aug-03 12:29 
GeneralWell Done Pin
prvert3-Aug-03 12:51
prvert3-Aug-03 12:51 
GeneralRe: Well Done Pin
Palladino5-Aug-03 12:35
Palladino5-Aug-03 12:35 
QuestionHow to obtain the event of the change of textbox's text Pin
moznan2-Aug-03 19:07
moznan2-Aug-03 19:07 
AnswerRe: How to obtain the event of the change of textbox's text Pin
Palladino5-Aug-03 12:42
Palladino5-Aug-03 12:42 
GeneralRe: How to obtain the event of the change of textbox's text Pin
Maximiliano Sosa6-Aug-03 16:15
Maximiliano Sosa6-Aug-03 16:15 
GeneralRe: How to obtain the event of the change of textbox's text Pin
Palladino7-Aug-03 5:27
Palladino7-Aug-03 5:27 
GeneralError provider messages in English Pin
scsoft1-Aug-03 13:10
scsoft1-Aug-03 13:10 
GeneralRe: Error provider messages in English Pin
Palladino2-Aug-03 1:30
Palladino2-Aug-03 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.