frame

Which icon sizes to use with a JFrame's setIconImages() method?

旧城冷巷雨未停 提交于 2019-11-27 06:37:55
问题 Does anyone know which icon sizes to use with the setIconImages() (PLURAL) method for a jFrame so that my app icons display well on all platforms and in all contexts (e.g., window icon, taskbar icon, alt-tab icon, etc.)? I've found an example that uses a 16px-by-16px and a 32px-by-32px image, but do I need to go any bigger? To test, I have also tried adding 64px and 128px versions to the List passed to setIconImages(), but these do not seem to be used on my Windows 7 machine. However, I

Python, how i can get gif frames

不羁岁月 提交于 2019-11-27 06:21:31
问题 I am looking some kind method to get gif frames number. i am looking on google, stackoverflow and any outher sites and i find only rubbish!! Someone know how to do it? i need only simple number of gif frames. 回答1: Just parse the file, gifs are pretty simple: class GIFError(Exception): pass def get_gif_num_frames(filename): frames = 0 with open(filename, 'rb') as f: if f.read(6) not in ('GIF87a', 'GIF89a'): raise GIFError('not a valid GIF file') f.seek(4, 1) def skip_color_table(flags): if

Calling functions from a Tkinter Frame to another

痴心易碎 提交于 2019-11-27 05:23:26
I have a page where I'll show some customers details. So I created a page called "customers details" with all the labels that I need and I set the text of these labels as variables. Too bad it doesn't work. The labels are created in the __init__ method so I can't "update" them, becouse the init is called only at the beginning. So what I thought is to create a new function that contains all the labels and I will call that function when I have the necessity...here's the problem. I'm not able to call a function in an other tk.Frame . The following code is a simplified version of the code. import

UIScreen MainScreen Bounds returning wrong size

浪子不回头ぞ 提交于 2019-11-27 03:55:43
So I created a new project with the latest version of XCode and tried to log the screen size of my app (to determine the device type for UI). I ran the following code from my iPhone 5: NSLog(@"%f", [[UIScreen mainScreen] bounds].size.height); This returned 480 , which is the screen size for the old iPhone family. I tried in the simulator and the same thing happened. Is there some property I have to enable in the project for it to recognize the screen size? This only happens for 5+ devices; if I run the game on my iPad, it recognizes the 1024 screen size. I know for a fact that this code has

extract all video frames in Android

耗尽温柔 提交于 2019-11-27 03:34:34
问题 I recorded a Video for limited time. Now i want to fetch all frames of video. I am using the below code and by using it i am able to get frames but i am not getting all video frames. 3 to 4 frames are repeated then i got a different frame. But as we all know we can get 25- 30 frames in a second to display smooth video. How to get all frames. for (int i = 0; i < 30; i++) { Bitmap bArray = mediaMetadataRetriever.getFrameAtTime( 1000000 * i, MediaMetadataRetriever.OPTION_CLOSEST); savebitmap

UIPickerView Height not changeable [duplicate]

∥☆過路亽.° 提交于 2019-11-27 02:51:02
问题 This question already has answers here : How to change UIPickerView height (28 answers) Closed 6 years ago . I'm trying to change PickerView's height self.pickerView = [[UIPickerView alloc] init]; self.pickerView.frame = CGRectMake(0, 0, frame.size.width, frame.size.height); Xcode log shows the following message: -[UIPickerView setFrame:]: invalid height value 274.0 pinned to 216.0 How can I change its height? 回答1: here are only three valid heights for UIPickerView (162.0, 180.0 and 216.0) .

How to locate and click on an element which is nested within multiple frame and frameset through Selenium using Webdriver and C#

佐手、 提交于 2019-11-27 02:26:31
I have html page like below and I need to click on Login inside the class clslogin. How do I traverse to find the Login. I'm using C# with selenium Webdriver. With XPath (/html/body/div/table/tbody/tr[1]/td[3]/a) I'm not getting control on Login class, always element not found error is throwing. Can anybody help me to get exact xpath. <html> <head></head> <frameset name="mytestTopFrame" rows="*"...... > <frame name="mytestTopsubframe" src="index.html" width="100%"......... > <html> <head></head> <frameset name="mytest" rows="70,20..."...... > <frame name="mytestsubframe" src="menu.html" width=

when should I use JFrame.add(component) and JFrame.getContentPane().add(component) in java

淺唱寂寞╮ 提交于 2019-11-27 02:15:00
问题 Is there a difference between them and are there any conditions in which one should be used instead of the other? 回答1: From what I understand from Javadocs, JFrame.add calls the latter. It is a convenience method to get around the incompatibility between AWT's frame and Swings JFrame. From javadocs for JFrame: The JFrame class is slightly incompatible with Frame. Like all other JFC/Swing top-level containers, a JFrame contains a JRootPane as its only child. The content pane provided by the

How do I change the background of a Frame in Tkinter?

怎甘沉沦 提交于 2019-11-27 02:14:06
I have been creating an Email program using Tkinter, in Python 3.3. On various sites I have been seeing that the Frame widget can get a different background using Frame.config(background="color") . However, when I use this in my Frames it gives the following error: _tkinter.TclError: unknown option "-Background" It does not work when doing the following: frame = Frame(root, background="white") Or: frame = Frame(root) frame.config(bg="white") I can't figure it out. I would post my whole source code but I dont want it exposed on the internet, but the frame creation goes something like this:

How to access frame (not iframe) contents from jQuery

泪湿孤枕 提交于 2019-11-27 02:04:56
问题 I have 2 frames in one page like this ( home.html ) <frameset rows="50%, 50%"> <frame id="treeContent" src="treeContent.html" /> <frame id="treeStatus" src="treeStatus.html" /> </frameset> and then in one frame ( treeStatus.html ) I have something like <body style="margin: 0px"> <div id="statusText">Status bar for Tree</div> </body> I want from the top window to manipulate the div located in the child frame via jquery (e.g show and hide). I have seen several questions like this and they