Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Solved]Variable in List View



  • Please log in to reply
2 replies to this topic
Xei
  • Members
  • 115 posts
  • Last active: Feb 11 2018 05:22 PM
  • Joined: 20 Jan 2012

I was wondering how to properly write a variable so that I display its contents in a ListView.
 

My_Name_Var = John
Gui, Add, Text,,My_Name_Var = %My_Name_Var%
Gui, Add, ListView,, Name
LV_Add("","%My_Name_Var%")  ; [SOLVED] As per the response below, this line should be:  LV_Add("",My_Name_Var)
Gui, Show, Center AutoSize, Name GUI
Return

GuiClose:
ExitApp


This code returns:
6zc39e.png



Cerberus
  • Members
  • 175 posts
  • Last active: Aug 17 2017 05:01 PM
  • Joined: 20 Jul 2009
✓  Best Answer
Have you tried removing both % and ", so just ("", My_Name_Var) ?

Xei
  • Members
  • 115 posts
  • Last active: Feb 11 2018 05:22 PM
  • Joined: 20 Jan 2012
Ahah! I have tried removing one of them, but never both!
Thank you.
[Solved]