Forms colors and icons

This forum is for programmers who have questions about the source code.
Post Reply
amireltaweel
Posts: 4
Joined: Tue Feb 21, 2017 4:45 pm

Forms colors and icons

Post by amireltaweel » Tue Feb 28, 2017 11:50 am

Guys...
Could anyone direct me to how to change forms colors and icons (the interface theme basically). I was able to do that no sweat with previous versions.
Thank you

allends
Posts: 240
Joined: Fri Aug 23, 2013 11:29 am

Re: Forms colors and icons

Post by allends » Mon Mar 06, 2017 11:08 am

I need a bit more information to give you a definitive answer. In the meantime this should cover most of the basics.
If you are building your own version of opendental then it is as simple as using the Visual Studio interface to change the form properties that you wish to change.

https://msdn.microsoft.com/en-us/librar ... .110).aspx
https://msdn.microsoft.com/en-us/librar ... .110).aspx

If you are looking to change the colors of grids and other custom controls, then you will need to edit the code directly and recompile it.

If you are writing a plug-in that performs these changes then you will need hooks in the forms you wish to change, most likely in the load method.
Then you will need to change the form properties inside your plug-in code.

If your question is asking if there is something simple, such as a setting, that will allow you to change every single form and every icon to a custom one, then no, that does not exist currently.
Allen
Open Dental Software
http://www.opendental.com

amireltaweel
Posts: 4
Joined: Tue Feb 21, 2017 4:45 pm

Re: Forms colors and icons

Post by amireltaweel » Mon Mar 06, 2017 4:36 pm

Thank you so much Allen; that really helped.

I'll work with that and try to come back with more specific questions.

Best regards

Amir

amireltaweel
Posts: 4
Joined: Tue Feb 21, 2017 4:45 pm

Re: Forms colors and icons

Post by amireltaweel » Tue Mar 07, 2017 5:34 pm

Hello Allen

I am trying to change the icons on the left menu (Family, Account, etc...) can you help me there ?

Thank you

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Forms colors and icons

Post by cmcgehee » Tue Mar 07, 2017 6:13 pm

Hello Amir,

Allen's gone for the night, but I can answer that question. The icons for each of the modules are stored in FormOpenDental.cs in a property named imageList32 which is a System.Windows.Forms.ImageList. You can find this list in the Design tab of FormOpenDental. This is where you can add your own icons. Then in FormOpenDental there is a member called myOutlookBar. You can set the ImageIndex on the Buttons on myOutlookBar to change the icon to your custom icon. You can see an example of this in FormOpenDental.RefreshMenuClinics().

Code: Select all

if(Clinics.IsMedicalPracticeOrClinic(Clinics.ClinicNum)) { //Changes the Chart and Treatment Plan icons to ones without teeth
	myOutlookBar.Buttons[3].ImageIndex=7;
	myOutlookBar.Buttons[4].ImageIndex=8;
}
else {//Change back to the normal Chart and Treatment Plan icons
	myOutlookBar.Buttons[3].ImageIndex=3;
	myOutlookBar.Buttons[4].ImageIndex=4;
}
Chris McGehee
Open Dental Software
http://www.opendental.com

amireltaweel
Posts: 4
Joined: Tue Feb 21, 2017 4:45 pm

Re: Forms colors and icons

Post by amireltaweel » Wed Mar 08, 2017 11:17 am

Thank you a TON Chris!

That was exactly what I'm looking for

Regards

Amir

Post Reply