Hello,
I have to create my own control which might be an extension for a standard
'panel' control. I called it 'SmartPanel'. This is specialized panel. It
consists of a title bar and a client area on which other controls can be
placed. Depends on its state, it can shrink into one of its borders so only
title bar is visible in shrinked state. Problem is as follows: I want to be a
title bar with name of panel (e.g "Tools") and I paint it in a OnPaint event.
It is all ok, but when I put on my panel some other control (e.g other Panel
or Button) and when I set its Docking style (e.g to DockStyle.Right) its
covering title bar of my SmartPanel! I tried to figure out what's going on. I
found ClientSize property. Fine, but I can't use in when my SmartPanel is in
state 'dock to left' or 'dock to bottom' because of title bar is at beginning
of client area. ClientRectangle property is read only and in MSDN is written
that "the coordinates of the upper-left corner of the rectangle returned by
this property are (0,0)", but I want to upper-left corner starts at (0, 20)
for example. Please help me to solve this setting me mad problem...
thanks for advance. 3 1329
Hi Dariusz,
There is a "DockPadding" property of "ScrollableControl".
You can define it for dock offset.
Cheers!
Marcin Hello,
I have to create my own control which might be an extension for a standard 'panel' control. I called it 'SmartPanel'. This is specialized panel. It consists of a title bar and a client area on which other controls can be placed. Depends on its state, it can shrink into one of its borders so only title bar is visible in shrinked state. Problem is as follows: I want to be a title bar with name of panel (e.g "Tools") and I paint it in a OnPaint event. It is all ok, but when I put on my panel some other control (e.g other Panel or Button) and when I set its Docking style (e.g to DockStyle.Right) its covering title bar of my SmartPanel! I tried to figure out what's going on. I found ClientSize property. Fine, but I can't use in when my SmartPanel is in state 'dock to left' or 'dock to bottom' because of title bar is at beginning of client area. ClientRectangle property is read only and in MSDN is written that "the coordinates of the upper-left corner of the rectangle returned by this property are (0,0)", but I want to upper-left corner starts at (0, 20) for example. Please help me to solve this setting me mad problem...
thanks for advance.
Thanks for Your answer, it realy workarounds my problem. Code is nice and
works but I still have a little question. In GDI API were functions
GetWindowOrg/SetWindowOrg (if my memory is well) which were setting a
particular window original position and help to prevent such as mine
situation. Is in GDI+/.NET platform any way do change window origin point?
Thanks for any ideas.
--
dariusz rajtak
"Marcin Grzębski" wrote: Hi Dariusz,
There is a "DockPadding" property of "ScrollableControl". You can define it for dock offset.
Cheers!
Marcin
Hello,
I have to create my own control which might be an extension for a standard 'panel' control. I called it 'SmartPanel'. This is specialized panel. It consists of a title bar and a client area on which other controls can be placed. Depends on its state, it can shrink into one of its borders so only title bar is visible in shrinked state. Problem is as follows: I want to be a title bar with name of panel (e.g "Tools") and I paint it in a OnPaint event. It is all ok, but when I put on my panel some other control (e.g other Panel or Button) and when I set its Docking style (e.g to DockStyle.Right) its covering title bar of my SmartPanel! I tried to figure out what's going on. I found ClientSize property. Fine, but I can't use in when my SmartPanel is in state 'dock to left' or 'dock to bottom' because of title bar is at beginning of client area. ClientRectangle property is read only and in MSDN is written that "the coordinates of the upper-left corner of the rectangle returned by this property are (0,0)", but I want to upper-left corner starts at (0, 20) for example. Please help me to solve this setting me mad problem...
thanks for advance.
Hi,
I don't have any experiences with Windows GDI.
So, I'm not sure what you mean as "Origin point".
But you can look for: "Control.CreateParams"
& "Form.StartPosition".
Cheers/Pozdrowienia
Marcin Thanks for Your answer, it realy workarounds my problem. Code is nice and works but I still have a little question. In GDI API were functions GetWindowOrg/SetWindowOrg (if my memory is well) which were setting a particular window original position and help to prevent such as mine situation. Is in GDI+/.NET platform any way do change window origin point? Thanks for any ideas.
-- dariusz rajtak
"Marcin Grzębski" wrote:
Hi Dariusz,
There is a "DockPadding" property of "ScrollableControl". You can define it for dock offset.
Cheers!
Marcin
Hello,
I have to create my own control which might be an extension for a standard 'panel' control. I called it 'SmartPanel'. This is specialized panel. It consists of a title bar and a client area on which other controls can be placed. Depends on its state, it can shrink into one of its borders so only title bar is visible in shrinked state. Problem is as follows: I want to be a title bar with name of panel (e.g "Tools") and I paint it in a OnPaint event. It is all ok, but when I put on my panel some other control (e.g other Panel or Button) and when I set its Docking style (e.g to DockStyle.Right) its covering title bar of my SmartPanel! I tried to figure out what's going on. I found ClientSize property. Fine, but I can't use in when my SmartPanel is in state 'dock to left' or 'dock to bottom' because of title bar is at beginning of client area. ClientRectangle property is read only and in MSDN is written that "the coordinates of the upper-left corner of the rectangle returned by this property are (0,0)", but I want to upper-left corner starts at (0, 20) for example. Please help me to solve this setting me mad problem...
thanks for advance.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rhy Mednick |
last post by:
I'm creating a custom control (inherited from UserControl) that is displayed
by other controls on the form. I would like for the control to disappear
when the user clicks outside my control the...
|
by: anand |
last post by:
Hi all,
I have created a custom control which displays Image using Graphics..
I am using this control in a different windows application.
I am dynamically creating the control and putting that...
|
by: Robin Bonin |
last post by:
In my user contol I am creating a set of dropdownlists.
Each list is created based on input from the other lists.
The problem I am having is setting the selected index on
the lists.
If someone...
|
by: Calvin Lai |
last post by:
Hi all,
I have a problem in creating web user control *programatically*. Problem as
follows:
1. WebUserControl1 contains a server side table named Table1
2. WebForm1 contain a server panel...
|
by: Richard Lionheart |
last post by:
Hi All,
I generated a WebForm and created a Virtual Directory for it IIS. But I got
an error message (shown below) saying something like my app lacked
appropriate privileges.
David Wang...
|
by: Charles Law |
last post by:
For some reason, when I click the X to close my MDI parent form, the action
appears to be re-directed to one of the MDI child forms, and the parent
remains open. I am then unable to close the...
|
by: Lee Newson |
last post by:
Hi,
I have just written my first application using VB.NET. The app works fine
when i am running it within .NET for debugging purposes, however when i try
to run the app from the .exe file that...
|
by: JJ |
last post by:
Using asp.net 1.1
I am trying to have a consistent look for the webcontrols. Right now, every
time I use textbox controls, I manually change the font property, size
property, and other property...
|
by: =?Utf-8?B?UHVjY2E=?= |
last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3
forms. I want allow users to move forward and backward with the forms and
retain the data users have entered. I thought...
|
by: Daveo |
last post by:
Dear all,
We recently migrated a SQL database from one server to another. Now,
when you try to run some code in an Access Database which links to the
SQL one, you get a 3704 error "Operation is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |