VB how to realize the dynamic display on a FORM like a folder icon within
The diagram below
At the same time the name of the folder on the right can define your own
CodePudding user response:
Listview + imagelist
CodePudding user response:
Very simple, add a ListView1 control, add a ImageList1 control, right-click the ImageList1 controls, in the "general" TAB, select "48 x 48," in the "image" option card inserted in turn 7 *. Ico icon, and then enter the following code:
Dim itmX As ListItem 'declare a ListItem object Private Sub Form_Load () Set itmX=ListView1. ListItems. Add (" 3 d objects ", 1) The Set itmX=ListView1. ListItems. Add (" video ", 2) The Set itmX=ListView1. ListItems. Add (" image ", 3) The Set itmX=ListView1. ListItems. Add (" file ", 4) The Set itmX=ListView1. ListItems. Add (" download ", 5) The Set itmX=ListView1. ListItems. Add (" music ", 6) The Set itmX=ListView1. ListItems. Add (" desktop ", 7) End Sub Ok!
CodePudding user response:
refer to the second floor ZHRXJR response: is very simple, add a ListView1 controls, add a ImageList1 control, right-click the ImageList1 controls, in the "general" TAB, select "48 x 48," in the "image" option card inserted in turn 7 *. Ico icon, and then enter the following code: Dim itmX As ListItem 'declare a ListItem object Private Sub Form_Load () Set itmX=ListView1. ListItems. Add (" 3 d objects ", 1) The Set itmX=ListView1. ListItems. Add (" video ", 2) The Set itmX=ListView1. ListItems. Add (" image ", 3) The Set itmX=ListView1. ListItems. Add (" file ", 4) The Set itmX=ListView1. ListItems. Add (" download ", 5) The Set itmX=ListView1. ListItems. Add (" music ", 6) The Set itmX=ListView1. ListItems. Add (" desktop ", 7) End Sub Ok! You this is called "dynamic"? Basically can be "fixed display" solution... CodePudding user response:
reference 3/f a toast to invite the bright moon response: Quote: refer to the second floor ZHRXJR response: Very simple, add a ListView1 control, add a ImageList1 control, right-click the ImageList1 controls, in the "general" TAB, select "48 x 48," in the "image" option card inserted in turn 7 *. Ico icon, and then enter the following code: Dim itmX As ListItem 'declare a ListItem object Private Sub Form_Load () Set itmX=ListView1. ListItems. Add (" 3 d objects ", 1) The Set itmX=ListView1. ListItems. Add (" video ", 2) The Set itmX=ListView1. ListItems. Add (" image ", 3) The Set itmX=ListView1. ListItems. Add (" file ", 4) The Set itmX=ListView1. ListItems. Add (" download ", 5) The Set itmX=ListView1. ListItems. Add (" music ", 6) The Set itmX=ListView1. ListItems. Add (" desktop ", 7) End Sub Ok! You this is called "dynamic"? Basically can be "fixed display" solution... Just give an example, dynamic words to achieve the original poster her, CodePudding user response:
The building of "dynamic" means what? Pictures, or with the system Settings, or move with the actual file list? Don't loathe to give up to ask questions in typing CodePudding user response:
reference 3/f a toast to invite the bright moon response: Quote: refer to the second floor ZHRXJR response: Very simple, add a ListView1 control, add a ImageList1 control, right-click the ImageList1 controls, in the "general" TAB, select "48 x 48," in the "image" option card inserted in turn 7 *. Ico icon, and then enter the following code: Dim itmX As ListItem 'declare a ListItem object Private Sub Form_Load () Set itmX=ListView1. ListItems. Add (" 3 d objects ", 1) The Set itmX=ListView1. ListItems. Add (" video ", 2) The Set itmX=ListView1. ListItems. Add (" image ", 3) The Set itmX=ListView1. ListItems. Add (" file ", 4) The Set itmX=ListView1. ListItems. Add (" download ", 5) The Set itmX=ListView1. ListItems. Add (" music ", 6) The Set itmX=ListView1. ListItems. Add (" desktop ", 7) End Sub Ok! You this is called "dynamic"? Basically can be "fixed display" solution... Click on the folder to achieve dynamic, this problem after click on the folder, according to the original poster is not dynamic, In addition, my answer is how to implement the building Lord hope in the ListView1 control folder icon, the effect of not click on the folder, this can only hope the original poster implements, CodePudding user response:
A custom widget, a picture + textbox, then calculate on size in a clearly, such as reply these time enough to put the thing to rewrite 10 times, As for dynamic, you willing to put the video is fine, CodePudding user response:
The original poster is missing, and we are blind fuck what heart... Often is all some what all don't understand, say again don't know his own "need" to send a post, and then play missing, CodePudding user response:
Thank you for your help, a few months not to see, I first took on the FORM button to come over, don't feel how beautiful, CodePudding user response:
null