Skip to content

I need some help with a simple drag and drop application. #682

Closed Answered by Z1-Gamer
Z1-Gamer asked this question in Q&A
Discussion options

You must be logged in to vote

I found a way to make it work but there is now another problem....
So i followed some of your previous advice and here is how i made it currently.

  func onDrop(names []string) {
       JustDropped = true
       ImageURL = names[0]
       giu.Update()
  }

This is the whole of my onDrop function now.

And here is the full code where the widget is:

`

    giu.ImageWithFile(Image1Url).OnClick(onClickMe).Size(240, Image1sizeX),
        giu.Custom(func() {
	    if giu.IsItemHovered() && JustDropped {
	        JustDropped = false
		ImageFile1, err := os.Open(ImageURL)
		if err != nil {
			log.Fatal(err)
		}
		Image1, _, err2 := image.DecodeConfig(ImageFile1)
		if err2 != nil {
			log.Fatal(err2)…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@Z1-Gamer
Comment options

@gucio321
Comment options

@Z1-Gamer
Comment options

@Z1-Gamer
Comment options

Answer selected by Z1-Gamer
@Z1-Gamer
Comment options

@gucio321
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants