Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 11 JAN 2000 05:47:47AM Colin Rule (CSSP) wrote:

I want to associate the scrolling of two list boxes, but there is no SCROLL event on this type of control.

The reason I want do do this is to have the icon associated with the list box excluded from the text because of the bug with the list box control requiring a colon (:) separator, meaning that you cannot have colons within the text being displayed.

Of course users can type whatever they like into the database, including text with colons, causing the problem.

Does anyone have any ideas how to:

a) Handle scrolling of list boxes

b) Get the icons to display WITH colons in the text

Thanks in advance…


At 11 JAN 2000 08:07AM Oystein Reigem wrote:

Colin,

There have been others asking how to synchronize a list box with an edit table, or with another list box. I think the replies indicated it could be done, but I've never tried it myself.

One piece you need is the TOPPOS property, which can be set as well as got. (The online help just mentions getting.)

I'm not certain about the other piece - how to detect that a list box scrolled. CHANGED and CHAR cannot detect scrolling done with the scroll bar.

I can think of two possible solutions:

One is to have the list box without a scroll bar and use a separate scroll bar control.

The other one is qualifying some event (that I don't know about) for the list box.

- Oystein -


At 11 JAN 2000 05:36PM Colin Rule wrote:

Thanks Oystein

Added scroll bar and associated TOPPOS, and sort of works at the first attempt.

It is a bit disappointing that VSCROLL is not a list box event, and even worse that TOPPOS is not visible in debugger. Hopefully Revelation will read this and resolve for the future.


At 12 JAN 2000 12:44AM Vince Poirier wrote:

One way I got many listboxes to scroll in synch was by using a separate vertical scroll bar object. This became the master scrolling control for all the boxes. Whenever the scroll bar was moved, it repositioned the listboxes accordingly. Whenever the listboxes were moved (by kybd, since no vscroll bar), it repositioned the vertical scroll bar to match.

It worked quite well.

As for being unable to put colons in the text, if I understand the problem right, you can.

A colon will be accepted and displayed in a bitmap listbox if the lines look like this:

1:First line c:\

(will display "First drive c:\" in listbox, preceded by bmp)

or

1-2:Second line d:\

(will display "Second line d:\" in listbox, " )

So, are you able to check the lines before you display them - and for the lines that contain a ":" (colon), just add a "1:" (or whatever bmp #) in front of the text. ie:

If a line to be displayed in listbox is "c:\temp.txt",

change it to "1:c:\temp.txt" before putting it in listbox.

Hope any of this may help.

Vince Poirier


At 19 JAN 2000 03:32AM Colin Rule wrote:

In the end the above suggestions failed.

Had to convert the list box to an edit table to get scrolling to work properly, liding the grid lines and change lots of code.

May I suggest (if Revelation read this) that a future release includes scrolling events for all controls that allow scrolling.


At 19 JAN 2000 08:30AM Oystein Reigem wrote:

Colin,

So how do you display your images now? In a separate column of bitmap controls?

- Oystein -


At 01 FEB 2000 03:32PM Colin Rule wrote:

Gave up on the idea of bitmaps.

My image has a P or S in a square box in different colours.

In the end I added the first column as a 15 pixel wide column, hid the row numbers and used color-by-pos to set the P and S to the colours I wanted.

Works perfectly, although not as pretty as a bitmap.

Trying the list box scroll association was too 'jumpy'

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/252896b0fbac5c7585256863003b4e7d.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1