New topic: 

Listbox.selected

<http://forums.realsoftware.com/viewtopic.php?t=45856>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        Rivo          Post subject: Listbox.selectedPosted: Thu Nov 08, 
2012 11:46 pm                         
Joined: Tue Aug 29, 2006 4:04 am
Posts: 479
Location: Indonesia                Hi,
I have a code to inserting new row below the selected row,

If listbox1.selected(o) then
  if o<listbox1.listcount then
  Listbox1.Cell(o,2)=Listbox1.Cell(o,2)+"*"
  ListBox1.InsertRow o+1,  ""
  listBox1.cell(listBox1.lastindex,2)="Disc "+lbldisc1.text +"%"


I'm putting '*' sign at the last char of listbox cell(o,2).

my question is, how to remove the star sign when I do voiding the discount 
using this code,
dim o as integer
for o=ListBox1.Listcount downto 0
  if ListBox1.selected(o) then
  listbox1.removeRow o


I want the row above the selected row column number 2 is removing the star sign.

any helps?

thanks

Regards,
Rivo   
                             Top                amitavak          Post subject: 
Re: Listbox.selectedPosted: Fri Nov 09, 2012 3:07 am                            
     
Joined: Mon Jan 02, 2012 1:51 am
Posts: 353
Location: India                What about.....

dim o as integer
for o=ListBox1.Listcount downto 0
  if ListBox1.selected(o) then
  if o > 0 And ListBox1.Cell(o -1, 2).right(1) = "*" Then
  ListBox1.Cell(o -1, 2) = ListBox1.Cell(o -1, 2).Left(ListBox1.Cell(o -1, 
2).len - 1)
  End if
  listbox1.removeRow o
      
_________________
Amitava Karan
Real Studio 2012 Release 1
Windows 7 (32 bit)
Mac OS X Version 10.7  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to