473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Colour datagrid scrollbars (ver: Spanish)

Mi ingles es peor que el de Toro Sentado, espero que en español haya alguien capaz de entenderme y orientarme
Trabajo con Visual Studio 2003 y C#, he creado un control derivado de datagrid y he conseguido modificar la apariencia del datagrid, colores de columnas, fuente, estilo de cabeceras de filas y columnas etc... Hasta aqui todo bien, pero soy incapaz de variar el color y estilo de los scrollbars vertical y horizontal, al parecer esto es bastante sencillo en controles web pero en winform no lo parece. Mis ultimos intentos han sido capturar el mensaje WM_CTLCOLORSCROLLBAR en WndProc y segun he leido podria conseguir cambiar el color si devuelvo el LParam de un scrollbar recien creado, pues eso no tengo ni idea de como conseguirlo

Gracias, por vuestra atención y estoy abierto a cualquier posibilidad que permita resolver mi problema antes de saltar desde mi terraza

Jack
Nov 16 '05 #1
2 6578
Hola!

This is a copy of my response to the original English thread:

1. Both scrollbars are available as protected properties (HorizScrollBar and
VertScrollBar).
2. Use the ScrollBar's ForeColor and BackColor properties to customize its
appearance

I see you have provided more info here but I my Spanish is at the very basic
level so I am not sure I got everything right.
So, try the above properties anyway. I think handling WM_CTLCOLORSCROLLBAR
would be an overkill.
Since you already inherit from the DataGrid, the protected properties should
be available to your code.

"Jack" <an*******@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com...
Mi ingles es peor que el de Toro Sentado, espero que en español haya alguien capaz de entenderme y orientarme. Trabajo con Visual Studio 2003 y C#, he creado un control derivado de datagrid y he conseguido modificar la apariencia del datagrid, colores de
columnas, fuente, estilo de cabeceras de filas y columnas etc... Hasta aqui
todo bien, pero soy incapaz de variar el color y estilo de los scrollbars
vertical y horizontal, al parecer esto es bastante sencillo en controles web
pero en winform no lo parece. Mis ultimos intentos han sido capturar el
mensaje WM_CTLCOLORSCROLLBAR en WndProc y segun he leido podria conseguir
cambiar el color si devuelvo el LParam de un scrollbar recien creado, pues
eso no tengo ni idea de como conseguirlo.
Gracias, por vuestra atención y estoy abierto a cualquier posibilidad que permita resolver mi problema antes de saltar desde mi terraza,
Jack


Nov 16 '05 #2
Hi Dmitry,
As I can accede to VertScrollBar, to change the BackColor

Thanks
Jac

public class ZDataGrid : DataGri
{
private System.ComponentModel.IContainer components
public ZDataGrid(

this.VertScrollBar.BackColor // ERROR PROTECTED PROPERTY NO ACCESSIBL
this.VScrollBar.BackColor // ERROR PROTECTED PROPERTY NO ACCESSIBL

public ScrollBar VScrollBar

get { return this.VertScrollBar;

}
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jay Ayliff | last post by:
Hi All, I have a VB.NET winforms app created in VS2003. It has a datagrid that is dynamically created on a tab. When the tab is displayed the scrollbars for the datagrid appear inside the outline...
3
by: Tim Marshall | last post by:
I would swear that when I developed in A97, I could change the back colour of a form. However, in Windows XP, on both A97 and A2003, there no longer is a property showing in the format tab for...
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
5
by: Ariel Gimenez | last post by:
Morning! After several hours breaking my mind, finally my code works, but i think is trash-code, can someone tellme how is the correct way to access the value of my cells within a datagrid?... in...
5
by: Jack | last post by:
How to change the colour of my datagrid scroll bars in win forms and c# Thanks Jack
0
by: Steve | last post by:
I have windows form with datagrid control. I don't want the datagrid control to display vertical and horizontal scrollbars. I wonder whether there is a way to get rid of scrollbars without...
1
by: Fabrício de Novaes Kucinskis | last post by:
Hi all, I have to problems concerning datagrids, tabcontrols and scrollbars: 1) I created a form with a TabControl. This TabControl has two TabPages: the first with a datagrid to browse...
4
by: scorpion53061 | last post by:
I have a datagrid that is switches between 2 different datasources. I set the anchor properties of my datagrid to for bottom, top, left , right. My form is set ot maximize on open. If the...
1
by: anujatomar | last post by:
hi I have programmed the datagrid in windows application form to display records.Now if records are many then scrollbars come automatically. this is ok.But i have also created 'Reset' button in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.