Xojo Conferences
MBSOct2019CologneDE

Clicking in Empty Listbox to Add Row (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: [ANN] Formatted Text Control version 1.0
Next thread: Access to TImer events?


Reading *CSV Files versus *.Txt Files   -   Claude Stone
  Clicking in Empty Listbox to Add Row   -   Mnogojazyk aol.com
   Re: Clicking in Empty Listbox to Add Row   -   Cindy Brown
   Re: Clicking in Empty Listbox to Add Row   -   Joe Strout
    Re: Clicking in Empty Listbox to Add Row   -   Mnogojazyk aol.com

Clicking in Empty Listbox to Add Row
Date: 27.08.08 23:39 (Wed, 27 Aug 2008 22:39:55 EDT)
From: Mnogojazyk aol.com
Hi, all...

A few years ago I wrote for my library a small utility
to print spine labels. It isn't perfect by any stretch of
the imagination, but it works fine well enough for our needs.

I'm starting to think about updating the poor dear,
and one of the little things that irks me is thus. In an
editing window is a listbox, and the listbox contains rows
of call numbers, volumes, authors, and titles. I'd like to
be able to double-click on either the empty listbox or
on the listbox below the last partial or full row and then
a new empty row will be added. I can't figure out how
to do so.

My code in the double-click event is

const empty = ""
dim last as integer

titles.AddRow empty // Add the empty row and

last = titles.listCount - 1
titles.listIndex = last // point to it.

title.cellCheck(last, kColumnChanged) = TRUE

The double-click event doesn't fire in an empty listbox
and if there are already rows, the double-click event
automatically adds another row to the listbox instead
of putting the cursor inside a column of the row where
the user clicked. I conclude from this is that the double-
click event is not the appropriate one.

Any hints or suggestions? Many thanks.

-- Charles Kelley.

**************
It's only a deal if it's where you want
to go. Find your travel deal here.

(http://information.travel.aol.com/deals?ncid ltrv00050000000047)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Clicking in Empty Listbox to Add Row
Date: 28.08.08 03:45 (Thu, 28 Aug 2008 14:45:51 +1200)
From: Cindy Brown
Hi Charles,

Couldn't you just add another row to the listbox with the words 'New
Entry' in it or something similar. Then they could double-click on
that line and it adds a blank row and puts the New Entry underneath.

Cindy

On 28/08/2008, at 2:39 PM, <email address removed> wrote:

> Hi, all...
>
> A few years ago I wrote for my library a small utility
> to print spine labels. It isn't perfect by any stretch of
> the imagination, but it works fine well enough for our needs.
>
> I'm starting to think about updating the poor dear,
> and one of the little things that irks me is thus. In an
> editing window is a listbox, and the listbox contains rows
> of call numbers, volumes, authors, and titles. I'd like to
> be able to double-click on either the empty listbox or
> on the listbox below the last partial or full row and then
> a new empty row will be added. I can't figure out how
> to do so.
>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Clicking in Empty Listbox to Add Row
Date: 28.08.08 03:52 (Wed, 27 Aug 2008 20:52:56 -0600)
From: Joe Strout
On Aug 27, 2008, at 8:39 PM, <email address removed> wrote:

> I'd like to
> be able to double-click on either the empty listbox or
> on the listbox below the last partial or full row and then
> a new empty row will be added. I can't figure out how
> to do so.
>
> My code in the double-click event is..

...misplaced, since as you discovered, it won't fire for nonexistent
rows. You'll need to use the MouseDown event instead.

Incidentally, what will you do when the listbox is full, and there
isn't any empty space available after the last row?

Best,
- Joe

Re: Clicking in Empty Listbox to Add Row
Date: 28.08.08 19:36 (Thu, 28 Aug 2008 18:36:09 EDT)
From: Mnogojazyk aol.com
Hi, all...

In a message dated 8/28/08 20:52 PM, Joe Strout writes:

> ...misplaced, since as you discovered, it won't fire for nonexistent 
> rows. You'll need to use the MouseDown event instead.
>
I knew there was an event that fired; I just couldn't figure out
which one. Thanks to Cindy Brown and Joe for the correction. It
works perfectly.

> Incidentally, what will you do when the listbox is full, and there 
> isn't any empty space available after the last row?
>
I already have a menu item, but some of my staff who use the
spine labeler have been caught because we've been spoiled by some
interfaces. They expect the cursor to appear in the first editable cell
merely by clicking somewhere on the listbox. I too have forgotten
my own interface and fallen for the trap. So I'm wanted to make
it easier to start making a new list by click on an empty row or
empty list. The rest of the time one selects the menu item.

Thanks again.

-- Charles Kelley.

**************
It's only a deal if it's where you want
to go. Find your travel deal here.

(http://information.travel.aol.com/deals?ncid=aoltrv00050000000047)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>