473,769 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Synchronize scrollbars on two sub-forms

I did not get too much help with me original question so here is
another.

I am trying to create a ColorPicker form for a Microsoft Access 2000
application.

I will not use the CommonControlsC olorDialog as the set of colors are
inconsistent with other Microsoft Applications, so I have a color table
with information for 16 different colors (Name, RGBNumber, ColorIndex,
Red, Blue, Green, etc.).

My first problem was that in addition to this info I would like to
display a box with a sample of the respective color. On my form any
attempt to set the color (based say on the RGBNumber) fails as changing
the background color of a textbox on a continuous changes that textbox
for ALL the records (although it would work for a single form,
unfortunately this is not one of those).
I solved this by doing the following: -
- Form (A) contains the fields from my color table
- Form (B) contains 16 text boxes whose background color it set based
on my color table
- Place these two subforms side-by-side, sized to display ALL the
records on a single form

This worked fine!

UNTIL. The number of colors I needed to use doubled. It was not a
problem to add another 16 text boxes but now that my subform (A) needs
to have a vertical scroll bar, how do I synchronize the subforms so that
the correct color box is in line with the correct color number.

I think I need to know a couple of things: -
i) How can I GET the "first visible record" in subform(A)
ii) How can I SET the "first visible record" in subform(B)

My thinking is that I can achieve ii) using the .SetFocus method, but
how do I find the value for i).
Clear as mud!
----
Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
2 4054
On 04 Oct 2004 13:49:38 GMT, Sean <se*********@Ti meaIntLtd.hu> wrote:
...
I will not use the CommonControlsC olorDialog as the set of colors are
inconsistent with other Microsoft Applications, so I have a color table
with information for 16 different colors (Name, RGBNumber, ColorIndex,
Red, Blue, Green, etc.).

Come on, admit it, you just want to program something different!
My first problem was that in addition to this info I would like to
display a box with a sample of the respective color. On my form any
attempt to set the color (based say on the RGBNumber) fails as changing
the background color of a textbox on a continuous changes that textbox
for ALL the records (although it would work for a single form,
unfortunatel y this is not one of those).


Well why not display in a format of two rows rather than two columns,
then there is no problem. You could also investigate how to show text
vertically to save space.

Another way would be to display on a single form using a pseudo-array
of controls. You can still drive it from a table and use a variable
number of visible controls if you want to, provided its not too many.
Lots of interesting coding here.

regards
David


Nov 13 '05 #2
Thanks David, however in answer to your points

a) your are probably right
b) you must be joking (save space ???)
c) done that, don't like the look

At the moment I have left the subformy at a fixed size, and added an
option group to select a "page" of colours. It's not the ideal solution,
but what can you do?
----
Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

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

Similar topics

6
11488
by: adrien | last post by:
Hi, (also posted in netscape.public.mozilla.browser) i use netscape 7 and want to hide the scrollbars of the window when something happens. I tried this: window.scrollbars.visible=false window.scrollbars.visibility="no" .... nothing works Is it also possible only to hide the vertical scrollbar instead of both?
24
4729
by: Nobody | last post by:
Okay, you are all so smart in here. Answer me this: IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I need to specify html instead. The scrollbars do hide on Gecko browsers though, so there is definitely a disagreement among browser developers on how to implement scrollbars (as a side note, Gecko browsers with their notoriously bug-ridden...
8
12105
by: Zlatko Matiæ | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
0
1069
by: | last post by:
Hi all. I build a new class for DataGrid control adding an handler to always show a Vertical ScrollBar in the grid. The code is below. ---------------------------------------------- Public Class MyDataGrid Inherits DataGrid Private _imgList As ImageList Public Event CurrentRowChanged()
2
922
by: sympatico | last post by:
hi, does anyone know how to change the style of the scrollbars in a vb.net windows application?? thanks in advance
1
1959
by: dbuchanan | last post by:
Hello, I have the controls on my form display the values of the currently selected row of the dataGrid. There are a few fields that I have in my data table where I have the user select a value from a comboBox. The comboBox is populated from a lookup table in my database. The comboBox displays the range of choices and when the user selects one the comboBox stores the appropriate ID field in the field of my data table.
0
1414
by: Sanjib Biswas | last post by:
Hi, I would like to know how to synchronize the vertical & horizontal scrollbars in 2 TreeView to move up & down, left & right synchronously. Noticed that TreeView does not have any scroll event for vertical & horizontal scroll. Any idea how to manage this in VB.Net 2005? I have also tried to debug windows message through the WndProc() routine and when I move the scrollbars in the TreeView it does not generate WM_HSCROLL (276),...
1
5548
by: =?Utf-8?B?YW5kaSByaWNrZW5iYWNo?= | last post by:
Hello, i have two listviews next to each other on a form. I would like to synchronize both vertical scrollbars of the two listviews with one scrollbar (for example VScrollBar). How can I do that? Thank you very much.
1
5006
by: =?Utf-8?B?YW5kaSByaWNrZW5iYWNo?= | last post by:
Hello, i have two listviews next to each other on a form. I would like to synchronize both vertical scrollbars of the two listviews with one scrollbar (for example VScrollBar). How can I do that? Thank you very much.
0
2059
by: nzkks | last post by:
Hi, I am using these: ASP.Net 2.0, VB.Net, Visual Studio 2005, SQL Server 2005 In a asp.net page, I have two multiview controls each has 2 views & its corresponding 2 menu items named Metric & Imperial. Individually both works fine. But when I click "Metric", the other "Metric" should also be switched on and vice-versa for Imperial. How to achieve that? The catch here is, one of the multiview control is inside a show/hide div with...
0
9586
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, 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...
0
9423
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,...
0
10210
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, 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...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
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,...
0
8869
agi2029
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...
1
7406
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
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();...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.