Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def cb():
dlg = MessageDialog(self, MessageDialog.Type.Warning, "Title",
"This is a question message", "Yes", "No",
True)
dlg.setCallback(cb2)
b.setCallback(cb)
import os
import sys
os.chdir(sys.path[0])
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "icons")
except:
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../icons")
except:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../resources/icons")
Label(window, "Image panel & scroll panel", "sans-bold")
imagePanelBtn = PopupButton(window, "Image Panel")
imagePanelBtn.setIcon(entypo.ICON_FOLDER)
popup = imagePanelBtn.popup()
vscroll = VScrollPanel(popup)
imgPanel = ImagePanel(vscroll)
imgPanel.setImages(icons)
popup.setFixedSize((245, 150))
img_window = Window(self, "Selected image")
img_window.setPosition((710, 15))
img_window.setLayout(GroupLayout())
dlg = MessageDialog(self, MessageDialog.Type.Warning, "Title",
"This is a question message", "Yes", "No",
True)
dlg.setCallback(cb2)
b.setCallback(cb)
import os
import sys
os.chdir(sys.path[0])
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "icons")
except:
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../icons")
except:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../resources/icons")
Label(window, "Image panel & scroll panel", "sans-bold")
imagePanelBtn = PopupButton(window, "Image Panel")
imagePanelBtn.setIcon(entypo.ICON_FOLDER)
popup = imagePanelBtn.popup()
vscroll = VScrollPanel(popup)
imgPanel = ImagePanel(vscroll)
imgPanel.setImages(icons)
popup.setFixedSize((245, 150))
img_window = Window(self, "Selected image")
img_window.setPosition((710, 15))
img_window.setLayout(GroupLayout())
imgView = ImageView(img_window, icons[0][0])
b.setCallback(cb)
b = Button(tools, "Ask")
def cb():
dlg = MessageDialog(self, MessageDialog.Type.Warning, "Title",
"This is a question message", "Yes", "No",
True)
dlg.setCallback(cb2)
b.setCallback(cb)
import os
import sys
os.chdir(sys.path[0])
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "icons")
except:
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../icons")
except:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../resources/icons")
Label(window, "Image panel & scroll panel", "sans-bold")
imagePanelBtn = PopupButton(window, "Image Panel")
imagePanelBtn.setIcon(entypo.ICON_FOLDER)
popup = imagePanelBtn.popup()
vscroll = VScrollPanel(popup)
imgPanel = ImagePanel(vscroll)
imgPanel.setImages(icons)
popup.setFixedSize((245, 150))
def cb():
dlg = MessageDialog(self, MessageDialog.Type.Warning, "Title",
"This is a question message", "Yes", "No",
True)
dlg.setCallback(cb2)
b.setCallback(cb)
import os
import sys
os.chdir(sys.path[0])
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "icons")
except:
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../icons")
except:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../resources/icons")
Label(window, "Image panel & scroll panel", "sans-bold")
imagePanelBtn = PopupButton(window, "Image Panel")
imagePanelBtn.setIcon(entypo.ICON_FOLDER)
popup = imagePanelBtn.popup()
vscroll = VScrollPanel(popup)
imgPanel = ImagePanel(vscroll)
imgPanel.setImages(icons)
popup.setFixedSize((245, 150))
img_window = Window(self, "Selected image")
img_window.setPosition((710, 15))
img_window.setLayout(GroupLayout())
b.setCallback(cb)
b = Button(tools, "Ask")
def cb():
dlg = MessageDialog(self, MessageDialog.Type.Warning, "Title",
"This is a question message", "Yes", "No",
True)
dlg.setCallback(cb2)
b.setCallback(cb)
import os
import sys
os.chdir(sys.path[0])
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "icons")
except:
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../icons")
except:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../resources/icons")
Label(window, "Image panel & scroll panel", "sans-bold")
imagePanelBtn = PopupButton(window, "Image Panel")
imagePanelBtn.setIcon(entypo.ICON_FOLDER)
popup = imagePanelBtn.popup()
vscroll = VScrollPanel(popup)
imgPanel = ImagePanel(vscroll)
imgPanel.setImages(icons)
popup.setFixedSize((245, 150))
dlg = MessageDialog(self, MessageDialog.Type.Warning, "Title",
"This is a question message", "Yes", "No",
True)
dlg.setCallback(cb2)
b.setCallback(cb)
import os
import sys
os.chdir(sys.path[0])
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "icons")
except:
try:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../icons")
except:
icons = nanogui.loadImageDirectory(self.nvgContext(), "../resources/icons")
Label(window, "Image panel & scroll panel", "sans-bold")
imagePanelBtn = PopupButton(window, "Image Panel")
imagePanelBtn.setIcon(entypo.ICON_FOLDER)
popup = imagePanelBtn.popup()
vscroll = VScrollPanel(popup)
imgPanel = ImagePanel(vscroll)
imgPanel.setImages(icons)
popup.setFixedSize((245, 150))
img_window = Window(self, "Selected image")
img_window.setPosition((710, 15))
img_window.setLayout(GroupLayout())
imgView = ImageView(img_window, icons[0][0])