Ranorex

Unable to perform context Menu operation in Listview rows

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
saurabh



Joined: 20 Jul 2007
Posts: 20
Location: India

PostPosted: Thu Aug 23, 2007 3:46 pm    Post subject: Unable to perform context Menu operation in Listview rows
I want to perform contecx menu operation for a selected rows in ListView.Like if I have 10 rows in List View then I want select 3rd and 5th row and get popup menu for the same means I want to first focus on selected row in ListView then want to get Contex Menu for that paricular row.Currentaly i am trying to do that by this code

Form* form = Application::FindFormTitle("Alarm manager",Ranorex::SearchMatchMode::MatchExact,true,5000);
ListView* lvCtrl = form->FindListView("AlmDisplayLV");
Mouse::MoveToControl(lvCtrl);
lvCtrl->Focus();
Ranorex::Element* items[] = lvCtrl->Element->FindChildren(Role::ListItem);
String *name = items[ElemIndex]->get_Name();
Ranorex::Element* item = lvCtrl->Element->FindChild(Ranorex::ListItem,name);
Mouse::ClickElement(item,MouseButtonType::RightButton);
ContextMenu::SelectItemText("Acked");

Here it is taking rows by values of first column but in my case each item have same value in first column so its always selecting first row.I want to select it by index not by value.I am trying to do it by GetChild() method but its not working.I am trying to make other column apart from first to use as a unique key but it not returing handler of element.
In other way Mouse::ClickElement() method take only Ranorex::Element its doesn't take array of Ranorex::Element so i can not pass it like
Mouse::ClickElement(items[ElemIndex],MouseButtonType::RightButton);

Please suggest me and help me to complete my logic.Its very critical and important.Thanks in advance
_________________
Regards,
Saurabh Shrivastava
GE Global Research
Bangalore India
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
saurabh



Joined: 20 Jul 2007
Posts: 20
Location: India

PostPosted: Thu Aug 23, 2007 4:29 pm    Post subject: I have done with this
Hi
I have done with this Smile
Just give me a sample code for functionality of ScrollBar It is not there is VS2003 Sample.
Like in my application in first page of ListView there is 11Item and I want to perfrom the above operation on 20th or 40th row so i think i have to move scroll bar till that page so tell me how can i do that.Its argent.
_________________
Regards,
Saurabh Shrivastava
GE Global Research
Bangalore India
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum