![]()  | 
 
How do you get caption of a markuped combobox? | 
 
    Post Reply  
   | 
  
| Author | |
   
   Norika  
   
   Groupie  
   Joined: 30 November 2006 Status: Offline Points: 73  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: How do you get caption of a markuped combobox?Posted: 14 March 2012 at 2:39am  | 
 
| 
   
    Hi, Everytime, I have to get the text like below. Do you know another good way? 
Public Function GetMarkupTextBlock_Caption$(strTextBlockText$)     Dim strTB_Start$ 
Dim strTB_End$ strTB_Start = "<TextBlock" strTB_End = "</TextBlock>" Dim s$ Dim i As Long s = Mid(strTextBlockText, InStr(strTextBlockText, strTB_Start) + Len(strTB_Start) + 1) s = Mid(s, InStr(s, ">") + 1) s = Left(s, InStr(s, strTB_End) - 1) GetMarkupTextBlock_Caption = s End Function Regards,  
Norika -- Windows XP SP3 Visual Basic 6.0 with SP6 Xtreme SuitePro ActiveX v15.2.1 ![]()  | 
 |
![]()  | 
 |
   
   jpbro  
   
   Senior Member  
   Joined: 12 January 2007 Status: Offline Points: 1357  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 14 March 2012 at 3:35pm | 
 
| 
   
    
   You can use the MarkupList() for XAML and AddItem for plain text as follows: 
   
  
 Or for existing projects where you don't want to change a lot of code, you can check out my XAML stripper: http://forum.codejock.com/forum_posts.asp?TID=14928&title=xaml-stripper  | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 16.2.6 
   
  Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6  | 
 |
![]()  | 
 |
   
   Norika  
   
   Groupie  
   Joined: 30 November 2006 Status: Offline Points: 73  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 19 March 2012 at 12:27am | 
 
| 
   
    
   Dear jpbro, 
 
   
  Thank you very much for your advice and suggestion. 
I'm going to change my source code for using MarkupList. Best Regards, 
 | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |