473,395 Members | 1,968 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.

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 CommonControlsColorDialog 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 4030
On 04 Oct 2004 13:49:38 GMT, Sean <se*********@TimeaIntLtd.hu> wrote:
...
I will not use the CommonControlsColorDialog 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,
unfortunately 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
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...
24
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...
8
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...
0
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...
2
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
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...
0
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...
1
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...
1
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...
0
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 &...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
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...
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...
0
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,...

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.