Xojo Conferences
XDCMay2019MiamiUSA

Make listbox cells behave like exel cells (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: What am I missing here???
Next thread: REALbasic Programming Contests?


RB Database   -   tom.russell transport.alstom.com
  Make listbox cells behave like exel cells   -   Zac Cohan
   Re: Make listbox cells behave like exel cells   -   Seth Willits
   Re: Make listbox cells behave like exel cells   -   Zac Cohan
   Re: Make listbox cells behave like exel cells   -   Seth Willits
   Re: Make listbox cells behave like exel cells   -   Zac Cohan
   Re: Make listbox cells behave like exel cells   -   Seth Willits
    Re: Make listbox cells behave like exel cells   -   GAmoore aol.com
     Re: Make listbox cells behave like exel cells   -   Zac Cohan
     Re: Make listbox cells behave like exel cells   -   CV
     Re: Make listbox cells behave like exel cells   -   Zac Cohan
     Re: Make listbox cells behave like exel cells   -   Seth Willits
    Re: Make listbox cells behave like exel cells   -   GAmoore aol.com
     Re: Make listbox cells behave like exel cells   -   Seth Willits
     Re: Make listbox cells behave like exel cells   -   Seth Willits
     Re: Make listbox cells behave like exel cells   -   Seth Willits

Make listbox cells behave like exel cells
Date: 23.01.05 02:38 (Sun, 23 Jan 2005 12:38:11 +1100)
From: Zac Cohan
Hello.

Is there any way to make cells in listboxes behave just like cells in
Microsoft Exel or any other spreadsheet application?

Basically, I want to be able to click on a cell, type text straight
into that cell and to have it save there when I click somewhere else.

Cheers and thanks in advance,

-Zac Cohan

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 03:25 (Sat, 22 Jan 2005 18:25:54 -0800)
From: Seth Willits
On Jan 22, 2005, at 5:38 PM, Zac Cohan wrote:

> Is there any way to make cells in listboxes behave just like cells in
> Microsoft Exel or any other spreadsheet application?
>
> Basically, I want to be able to click on a cell, type text straight
> into that cell and to have it save there when I click somewhere else.

Set the column type of every column to 3:

Listbox.ColumnType(x) = 3


Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"Shyness is so quiet and reserved yet such a treasonous villain."
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 03:39 (Sun, 23 Jan 2005 13:39:46 +1100)
From: Zac Cohan
Great. However the cells are really tricky to make editable.

If I click out of the application and back in they seem to be editable,
or if i hit return and then click, however double clicking or single
clicking does nothing.

-Zac

On 23/01/2005, at 1:25 PM, Seth Willits wrote:

> On Jan 22, 2005, at 5:38 PM, Zac Cohan wrote:
>
>> Is there any way to make cells in listboxes behave just like cells in
>> Microsoft Exel or any other spreadsheet application?
>>
>> Basically, I want to be able to click on a cell, type text straight
>> into that cell and to have it save there when I click somewhere else.
>
> Set the column type of every column to 3:
>
> Listbox.ColumnType(x) = 3
>
> Seth Willits
> -----------------------------------------------------------------------
> ----
> President and Head Developer of Freak Software - http://www.freaksw.com
> REALbasic Guru at ResExcellence -
> http://www.resexcellence.com/realbasic
>
> "Shyness is so quiet and reserved yet such a treasonous villain."
> -----------------------------------------------------------------------
> ----
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 04:18 (Sat, 22 Jan 2005 19:18:28 -0800)
From: Seth Willits
On Jan 22, 2005, at 6:39 PM, Zac Cohan wrote:

> Great. However the cells are really tricky to make editable.
>
> If I click out of the application and back in they seem to be
> editable, or if i hit return and then click, however double clicking
> or single clicking does nothing.

I'm not quite sure what all that meant, but you can use the
CellKeyDown, CellFocus, window Deactivate, etc, events to customize the
behavior as you need it.

Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"When you are courting a nice girl an hour seems like a second. When you
sit on a red-hot cinder a second seems like an hour. That's
relativity."
-- Albert Einstein
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 07:35 (Sun, 23 Jan 2005 17:35:39 +1100)
From: Zac Cohan
What code would I place in the cell-click event to make a cell become
editable when clicked?
Thanks again,

-Zac
On 23/01/2005, at 2:18 PM, Seth Willits wrote:

> On Jan 22, 2005, at 6:39 PM, Zac Cohan wrote:
>
>> Great. However the cells are really tricky to make editable.
>>
>> If I click out of the application and back in they seem to be
>> editable, or if i hit return and then click, however double clicking
>> or single clicking does nothing.
>
> I'm not quite sure what all that meant, but you can use the
> CellKeyDown, CellFocus, window Deactivate, etc, events to customize
> the behavior as you need it.
>
> Seth Willits
> -----------------------------------------------------------------------
> ----
> President and Head Developer of Freak Software - http://www.freaksw.com
> REALbasic Guru at ResExcellence -
> http://www.resexcellence.com/realbasic
>
> "When you are courting a nice girl an hour seems like a second. When
> you
> sit on a red-hot cinder a second seems like an hour. That's
> relativity."
> -- Albert Einstein
> -----------------------------------------------------------------------
> ----
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 08:01 (Sat, 22 Jan 2005 23:01:55 -0800)
From: Seth Willits
On Jan 22, 2005, at 10:35 PM, Zac Cohan wrote:

> What code would I place in the cell-click event to make a cell become
> editable when clicked?

me.EditCell row, column

See the language reference for a whole slew of options.


Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"Your friend is the person who knows all about you and still likes you."
-- Elbert Green Hubbard
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 06:34 (Sun, 23 Jan 2005 05:34:45 EST)
From: GAmoore aol.com

In a message dated 1/22/05 11:02:16 PM, <email address removed> writes:

> On Jan 22, 2005, at 10:35 PM, Zac Cohan wrote:
>
> > What code would I place in the cell-click event to make a cell become 
> > editable when clicked?
>
> me.EditCell row, column
>
>
> See the language reference for a whole slew of options.
>

I think you have to set the cell type to 3 or something like that in the open
event for the listbox. There are several options to set the type of the
listcells - e.g. editable, checkbox, etc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 11:43 (Sun, 23 Jan 2005 21:43:22 +1100)
From: Zac Cohan
Yeah, me.EditCell row, column works great however just setting the type
to editable makes cells act funny. Sometimes they let you put text in
and sometimes they dont. Its very frustrating.

-Zac
On 23/01/2005, at 9:34 PM, <email address removed> wrote:

>
> In a message dated 1/22/05 11:02:16 PM, <email address removed> writes:
>
>> On Jan 22, 2005, at 10:35 PM, Zac Cohan wrote:
>>
>>> What code would I place in the cell-click event to make a cell
>>> become 
>>> editable when clicked?
>>
>> me.EditCell row, column
>>
>> See the language reference for a whole slew of options.
>>
> I think you have to set the cell type to 3 or something like that in
> the open
> event for the listbox. There are several options to set the type of the
> listcells - e.g. editable, checkbox, etc.
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 20:35 (Sun, 23 Jan 2005 13:35:36 -0600)
From: CV

If you'd like, post some more detail on what you're seeing that doesn't
seem right and the code your using. How many columns in your list box?

Jack

On Jan 23, 2005, at 4:43 AM, Zac Cohan wrote:

> Yeah, me.EditCell row, column works great however just setting the
> type to editable makes cells act funny. Sometimes they let you put
> text in and sometimes they dont. Its very frustrating.
>
> -Zac
> On 23/01/2005, at 9:34 PM, <email address removed> wrote:
>
>>
>> In a message dated 1/22/05 11:02:16 PM, <email address removed> writes:
>>
>>> On Jan 22, 2005, at 10:35 PM, Zac Cohan wrote:
>>>
>>>> What code would I place in the cell-click event to make a cell
>>>> become 
>>>> editable when clicked?
>>>
>>> me.EditCell row, column
>>>
>>>
>>> See the language reference for a whole slew of options.
>>>
>> I think you have to set the cell type to 3 or something like that in
>> the open
>> event for the listbox. There are several options to set the type of
>> the
>> listcells - e.g. editable, checkbox, etc.

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 23:10 (Mon, 24 Jan 2005 09:10:56 +1100)
From: Zac Cohan
Two columns. So with the column type editable, you should be able to
type text in cells when you click on them right?...or double click
them?.... Hmm... I cant quite figure out the formula for making them
happily editable. By editable i mean go to that state where you can
actually type in text as oppose to not being able to. I found actually
clicking out of the application and clicking back into it on one of the
cells will make it editable.

-Zac

On 24/01/2005, at 6:35 AM, CV wrote:

>
> If you'd like, post some more detail on what you're seeing that
> doesn't seem right and the code your using. How many columns in your
> list box?
>
> Jack
>
> On Jan 23, 2005, at 4:43 AM, Zac Cohan wrote:
>
>> Yeah, me.EditCell row, column works great however just setting the
>> type to editable makes cells act funny. Sometimes they let you put
>> text in and sometimes they dont. Its very frustrating.
>>
>> -Zac
>> On 23/01/2005, at 9:34 PM, <email address removed> wrote:
>>
>>>
>>> In a message dated 1/22/05 11:02:16 PM, <email address removed> writes:
>>>
>>>
>>>> On Jan 22, 2005, at 10:35 PM, Zac Cohan wrote:
>>>>
>>>>> What code would I place in the cell-click event to make a cell
>>>>> become 
>>>>> editable when clicked?
>>>>
>>>> me.EditCell row, column
>>>>
>>>>
>>>> See the language reference for a whole slew of options.
>>>>
>>>
>>>
>>> I think you have to set the cell type to 3 or something like that in
>>> the open
>>> event for the listbox. There are several options to set the type of
>>> the
>>> listcells - e.g. editable, checkbox, etc.
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 23:19 (Sun, 23 Jan 2005 14:19:10 -0800)
From: Seth Willits
On Jan 23, 2005, at 2:10 PM, Zac Cohan wrote:

> Two columns. So with the column type editable, you should be able to
> type text in cells when you click on them right?...or double click
> them?....

Double click.

> Hmm... I cant quite figure out the formula for making them happily
> editable.

In CellClick simply put me.EditCell row, column.


Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"Intellectual solve problems; geniuses prevent them."
-- Albert Einstein
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 17:09 (Sun, 23 Jan 2005 16:09:48 EST)
From: GAmoore aol.com

In a message dated 1/22/05 6:40:15 PM, <email address removed> writes:

> If I click out of the application and back in they seem to be editable, 
> or if i hit return and then click, however double clicking or single 
> clicking does nothing.
>

They seem a bit clumsy to use. In Excel you click and write. In LB's in
spreadsheet mode, you seem to have to double click then also drag to select
existing text. Command A doesn't work also. I did the thing were I captured the ascii
for command A and then made it automatically select all so I can delete and
move to the next cell, but Joe pointed out that was not good programming
practice and suggested a menu select all, but I am not sure how that works at the
window level when I am in a single cell.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 23:28 (Sun, 23 Jan 2005 14:28:28 -0800)
From: Seth Willits
On Jan 23, 2005, at 1:09 PM, <email address removed> wrote:

>> If I click out of the application and back in they seem to be
>> editable, 
>> or if i hit return and then click, however double clicking or single 
>> clicking does nothing.
>
> They seem a bit clumsy to use. In Excel you click and write. In LB's in
> spreadsheet mode, you seem to have to double click then also drag to
> select
> existing text. Command A doesn't work also. I did the thing were I
> captured the ascii
> for command A and then made it automatically select all so I can
> delete and
> move to the next cell, but Joe pointed out that was not good
> programming
> practice and suggested a menu select all, but I am not sure how that
> works at the
> window level when I am in a single cell.

Everything is customizable.

<http://www.freaksw.com/Spreadsheet.rb.zip>


Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"You may laugh at me for chasing a dream, but I'll have the last laugh
when I catch it."
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 23.01.05 23:38 (Sun, 23 Jan 2005 14:38:59 -0800)
From: Seth Willits
On Jan 23, 2005, at 2:28 PM, Seth Willits wrote:

> Everything is customizable.
>
> <http://www.freaksw.com/Spreadsheet.rb.zip>



Also, you can change the CellKeyDown to this to enable the whole
tab/return thing to change cells.

Function CellKeyDown(row as Integer, column as Integer, key as String)
As Boolean
if key = "a" and Keyboard.AsyncCommandKey then
ActiveCell.SelStart = 0
ActiveCell.SelLength = Len(ActiveCell.Text)
return true
end if

if key = chr(13) then
if row + 1 < ListCount then
EditCell row + 1, column
else
if column + 1 < ColumnCount then
EditCell 0, column + 1
end if
end if
return true
end if

if key = chr(9) then
if column + 1 < ColumnCount then
EditCell row, column + 1
else
if row + 1 < ListCount then
EditCell row + 1, 0
end if
end if
return true
end if

return CellKeyDown(row, column, key)
End Function



Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"Time goes by so fast, people go in and out of your life. You must
never
miss the opportunity to tell these people how much they mean to you."
-- "Cheers"
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

Re: Make listbox cells behave like exel cells
Date: 24.01.05 00:02 (Sun, 23 Jan 2005 15:02:39 -0800)
From: Seth Willits
On Jan 23, 2005, at 2:38 PM, Seth Willits wrote:

>> Everything is customizable.
>>
>> <http://www.freaksw.com/Spreadsheet.rb.zip>
> Also, you can change the CellKeyDown to this to enable the whole
> tab/return thing to change cells.

As a matter of fact:
<http://www.resexcellence.com/realbasic/>


Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"Rather fail with honor than succeed by fraud."
-- Sophocles
------------------------------------------------------------------------
---

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

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>