Given a control1 on a UserControl:
After much experimentation I find that the x and y values given to
control1.SetBou nds(x,y,...
needs to have the positions of the scrollbars thumbs subtracted from them.
That is, to put the control in the top right corner of the usercontrol (i.e,
0,0) use:
control1.SetBou nds(-hScrollShift, -vScrollShift, ...
I can't find anything in the doc to explain this.
Also it seems that setting Top or Left directly does not require the
addition.
Can anyone verify this or correct me.
Especially nice would be direction to some documentation.
Thanks in advance 0 1271 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: M.Kamermans |
last post by:
I have a rudimentary gui with a class that extends JPanel, which sets its
content to a jpg image using:
if (im != null) { g.drawImage(im,0,0,null); }
in the paint() method. However, when I create a JScrollPane that uses this
JPanel extension as its scrollable client, and call a validate, the
scrollbars get visuall overwritten with the jpg image.
Has anyone encountered this error before and knows how to fix it?
|
by: Paul Cochrane |
last post by:
Hi all,
I've got an application that I'm writing that autogenerates python code
which I then execute with exec(). I know that this is not the best way to
run things, and I'm not 100% sure as to what I really should do. I've had a
look through Programming Python and the Python Cookbook, which have given me
ideas, but nothing has gelled yet, so I thought I'd put the question to the
community. But first, let me be a little more detailed...
|
by: zebidy |
last post by:
I am missing something realy basic here.
If I create a control programmaticly and then assign it to a control that
has already been placed on the page at designe time it does not appear to
render correctly.
example:
I have created a page in the designer with two controls
a label control called lbl1
and a textbox control called tb1
|
by: Just Me |
last post by:
I have a usercontrol on which I have, say, five controls.
I want a context menu to popup when the mouse is clicked anywhere on the
userconttrol.
The same context menu.
What I've done in the past is to put code in each control's mouseup event.
Is that the way to go or is there a better way?
|
by: Steve Long |
last post by:
Hello,
I have tried a couple of ways to set the location of a form before it
becomes visible and the results have been erratic at best. My latest attempt
is to use the SetBounds method passing in the Left, Top, Width, Height of
the form but it doesn't come up in the same location as it should. Am I
missing something here? What is the best way to ensure the location of a
form before it becomes visible? Letting is become visible and then...
| |
by: Maya |
last post by:
Hello everyone,
I have a windows form that has 2 child usercontrols i created and added
inside, control1 has a label that displays some text based on
activities i do in control2, my question is how do i update the label
text inside control1 from control2? previously i got around this issue
by using properties and static variables but this doesn't work with
form controls such as the label i have.
Any solution would be highly...
|
by: herman404 |
last post by:
Hi everyone, I have a DataGrid that displays data on a dialog
application. When the dialog is resized, the datagrid keeps the same
shape, We would need the datagrid to keep a relative shape compared to
the rest of the dialog when the user resizes it. Any ideas on how to
do this?
Thanks!
|
by: benfly08 |
last post by:
Hi,
I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item. However, when I code selection event, i cannot access to the list i pass in. Anybody got idea? Below is the code.
public static void setUpMenu(final Shell shell, Menu popUpMenu, final String clientId) {
myShell = shell;
...
|
by: Kid Programmer |
last post by:
Hello guys. I just tried out using the setBounds method after looking at it in the Java API under JButton (though any other component should have it) and so anyways I tried it out in a simple little program. But no matter how much I change the parameters the button never changes. Why is this?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |