LB Booster
« Single/double click »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:51am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Single/double click  (Read 2638 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Single/double click
« Reply #26 on: Nov 13th, 2015, 3:52pm »

Think outside the (list) box. The five listboxes in the appointments window work together as a "spreadsheet" to display information about patient appointment, rather than their usual role as a list of items for selection. The columns are days , the rows are hours of the days. There are two things that can be done after after an appointment has been entered in the area below the grid: get a patient's phone number for reminder calls, and erase the data if an appointment is canceled.

I fail to see how assigning the two actions to single and double clicks would cause any user frustration, as compared to clicking an entry, moving the mouse off the grid, and clicking on one of two buttons.

Richard noted that clicking on an already chosen entry does nothing. But that is standard behaviour for a list box, is it not? I just neglected to add a set-index-to-zero command.

He also noted that clicking anywhere but on an entry does nothing. Yes What other behaviour would be expected? The entry to be deleted, or the patient phone number to be displayed is identified by it's location. If the entry clicked on is blank , nothing should happen, and nothing does

I am not demanding that LBB be changed to work as LB does, I only expressed a hope.

If Richard chooses not to change LBB in this case, that's final. He is the author of a very good software product and obviously the sole authority for changes or non-changes.

If he changes LBB in this case, I'll be pleased.
If not, no hard feelings, let's move on.

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Single/double click
« Reply #27 on: Nov 13th, 2015, 4:34pm »

on Nov 13th, 2015, 3:52pm, Alincon wrote:
The five listboxes in the appointments window work together as a "spreadsheet"

So is there a specific reason why you don't use a spreadsheet? There are some very good LB spreadsheet emulations, e.g. using a grid of graphicboxes (remember that in LBB you can create them in a loop, so even a large grid isn't expensive in code).

Quote:
I fail to see how assigning the two actions to single and double clicks would cause any user frustration

The potential frustration is that they only work some of the time. Single-clicking on the currently-selected item doesn't work. Double-clicking on anything other than the currently-selected item doesn't work. This behaviour is not intuitive and therefore the user is likely to be surprised and irritated by it.

It seems to me that the problems arise primarily because you are trying to force a listbox to do something it was never intended to do, which is to emulate a column in a spreadsheet. There are other, and potentially better, ways to emulate a spreadsheet.

But if you are convinced that the way it works in LB is the way you want it to work, I gave you a complete LBB solution (using polling) in my reply of earlier today. As far as I know this behaves in a way which is indistinguishable from your LB code.

Richard.
« Last Edit: Nov 13th, 2015, 4:42pm by Richard Russell » User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: Single/double click
« Reply #28 on: Nov 14th, 2015, 01:39am »

Richard,

Thank you, your example is wonderful, in fact it is act as the LISTBOX actually has the tow events built in either LBB or LB.
I impressed for these two examples it is better even than Stefans example the first one I post.

The following modified Richards code works on both LB and LBB.

Regards.

Code:
for i = 1 to 10
      array$(i) = "Patient ";i
    next

    listbox #w.lb, array$(), [apptDel], 20, 20, 200, 200
    open "Demo for Alincon" for window as #w
    #w "trapclose [quit]"

[loop]
    timer 100, [poll]
    wait
    
[poll]
timer 0
    #w.lb "selectionindex? sel"
    if sel <> OldSel then
      OldSel = sel
      Goto [selectAction]
    end if
goto [loop]

[apptDel]
    Goto [doubleClickAction]
    wait
     
[selectAction]
print "[selectAction]"
wait

[doubleClickAction]
print "[doubleClickAction]"
wait  

[quit]
close #w
End    
    
 
« Last Edit: Nov 14th, 2015, 02:34am by SarmedNafi » User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: Single/double click
« Reply #29 on: Nov 14th, 2015, 01:55am »




I think this technique could be added to textbox and the text box portion of combobox too.

The replay to who said it is too much code is, we satisfy from the beginning to use a minimum amount of commands to build what ever we wants.
User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: Single/double click
« Reply #30 on: Nov 14th, 2015, 02:57am »


Since first day I used Liberty Basic, I noticed there is no much control events I can use, specially with ListBox and ComboBox, the only choice is to select the item of the list box and click a button by a mouse, therefor I have to use many buttons to be clicked. The second thing is I can't use function buttons easily like with VB6, therefor I have to use timer to check a ROOT branch routine to trap all events I needs in my program.
Since the timer is broken under LB, or it doesn't work as documented, make LB very weak in such task.
Fortunately LBB is exist and has no such problems, we have to use it if we wants to build events system, Timer under LBB work fine.
Asking the authors to add features is a question could be not answers, therefor we have to accepts both LB and LBB as it is.

Sarmed
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Single/double click
« Reply #31 on: Nov 14th, 2015, 09:36am »

on Nov 14th, 2015, 02:57am, SarmedNafi wrote:
Since the timer is broken under LB, or it doesn't work as documented, make LB very weak in such task.

I have long since given up trying to understand Carl. I expected that he would either fix this bug in 4.5.0 or (if for some reason that proved impossible) change the documentation to state that TIMER cannot use a SUB handler. But he did neither, leaving each new LB user to discover for themselves that it crashes. sad

Richard.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls