Search Results

Search found 4648 results on 186 pages for 'voting buttons'.

Page 30/186 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Use TinyInt to hide/show controls?

    - by grady
    Hi, I have 6 buttons on my GUI. The visibility of the buttons can be configured via checkboxes. Checking the checkbox and saving means the correpsonding button should be shown. I am wondering if it is somehow possible to have one TinyInt column in the database which represents the visibility of all 6 buttons. I created an enum for the buttons, it looks like that: public enum MyButtons { Button1 = 1, Button2 = 2, Button3 = 3, Button4 = 4, Button5 = 5, Button6 = 6 } Now I am wondering how to say that for example only button1, button5 and button6 are checked using this one column. Possible at all? Thanks :-)

    Read the article

  • Android - How to prevent the phone screen from turning on when volume or camera key is pressed?

    - by 2Real
    I have an activity that shows up when the phone screen goes to sleep/turns off ie turns black. For some reason, the phone turns on when the volume buttons or the camera buttons are pressed. By turns on, I mean the screen wakes up or comes back from the black screen state. I've tried using dispatchKeyEvent(KeyEvent event) and the buttons are disabled on the activity, but they still wake up the phone.

    Read the article

  • Android layouts within layouts, with separate classes handling their input?

    - by Demonofloom
    Hey all, I have created a program in Java that uses Jpanels within Jpanels. One example of this is having a side view containing buttons that change the main view when pressed. The main view also has buttons that can be used to alter itself. I am trying to re-create this on the android. I have my layout set up from an xml, with a side panel containing buttons and the main view. There is another xml that contains what I want in the main view. Now I am struggling to get this separate xml to be displayed in the main view and can’t figure out how I would get the class to handle its own input. I don’t want to paste the code into the main.xml as I want to keep things object orientated and each view needs some custom elements such as different textviews. An example of what I am trying to convert for the android is below:- //The ViewInt class has its own layout ViewInt tempView = new ViewInt(i, mFloorNo); //The viewInt class is then added to the main window. mainWindowPanel.add(tempView); This small bit of code would create a view, add it to the main view and then any input in the main window is handled by that class, but at the same time any input not in this main window is handled by another class (probably the root class). Any help is greatly appreciated, thanks. To clarify: The program has a side panel layout, containing buttons. And a main view layout that is empty. I am trying to set a .xml layout to this main view layout, and have it so that if any buttons are pressed in that main view then a class for that layout will handle it.

    Read the article

  • Android Programmatically created Button Persistence

    - by WtLgi
    So in an app I'm messing around with I programmatically create some buttons. Then I setContentView(); to a different page. Then if I come back to the original page (on which I placed the programmatically created buttons), they no longer exist. I guess this makes sense as I am calling setContentView(R.layout.main); again which is just the original xml file with no data pointing to the buttons. So is there a way to have the buttons persist over such screen transitions? Thanks.

    Read the article

  • Dynamic content in a Gridview

    - by mariki
    I have a gridview with couple of columns,I want to achieve the following: If user is NOT authorized display normal columns. If user IS authorized: set mouseover event for first column text and display some buttons (that are not available for NOT authorized users) in a second column when user hover over(using javascript) the first column. I am have 2 difficulties: The first one where and when should I create the buttons? I have 2 options, I can create those button on design time, in gridviews template and just set Visible value to false and then in codebehind set it to true if user is authorized. The second option would be creating this buttons dynamically in gridview_RowCreated event (or any other event) if user is authorized. The Second difficulty is setting the javascript event to show the buttons, the event should be added only if user is authorized! Note that event and buttons should have some kind of id match for Javascript function to know what should it hide/unhide when event is triggered. What should I do, what is the best practice? I know this is a long question, but please try to help :)

    Read the article

  • Control ( UIButton, UILable) Hides when the Video plays Again on iPhone!

    - by Taimur Hamza
    Hi, I have displayed UIButton on top of Playing Movie using this code. NSArray *windows = [[UIApplication sharedApplication] windows]; if ([windows count] 1) { // Locate the movie player window UIWindow *moviePlayerWindow = [[UIApplication sharedApplication] keyWindow]; // Add our overlay view to the movie player's subviews so it is // displayed above it. [moviePlayerWindow addSubview:self.myABC]; } There are 2 buttons on top of my movie layer. They play different videos.Now the strange part is the video plays fine with buttons showing on top of it. When i press the button to play the other movie plays but the buttons doesnt show. Seems the view reloads and flushes all the Subviews. But i have checked it in the debug mode and it enters into the 'if' condition and this line runs [moviePlayerWindow addSubview:self.myABC]; But the buttons are not dislpayed. Any ideas wats going wrong ? Thanks, Taimur

    Read the article

  • JSplitPane overlaps JButtons in BorderLayout, but does not when layout is null

    - by thaweatherman
    So I'm having another issue..... I'm currently using a BorderLayout in my GUI so that when I resize my jframe, all of the internal components resize with it. I couldn't get any other layout to work with how I want the GUI to look while providing this resizing capability. At the top I have a JMenuBar, and below it I have a bunch of buttons. Below that I am supposed to have a JSplitPane, and it is there. However, the buttons seemed to be contained within the JSplitPane, which is not my intention. So when anything happens within the splitpane, the buttons disappear until I move my mouse over them again. When I set my layout to null everything works great except I lose the resizing capability, which is not good. Tried posting images but it wont let me since my rep isnt at 10 yet :( Any suggestions? I've tried putting the buttons into a JPanel then adding the jpanel but the splitpane overlaps with that. Same with a JToolBar. The order in which I add my items is: 1) the menu bar setJMenuBar(menuBar) 2) the buttons getContentPane().add(btnZoomIn) etc. 3) the split pane getContentPane().add(splitPane) then the rest of the things you see after that

    Read the article

  • jquery show hide div's with a href tag

    - by user1736794
    I have some jquery which reveals and hides new div's based on which button is pressed. Rather than buttons i would like to insert my own text/image and have them work in the same way, revealing and hiding the new windows. Here is the jquery: <script> $(document).ready(function(){ $(".buttons").click(function () { var divname= this.value; $("#"+divname).show("slow").siblings().hide("slow"); }); }); </script> Here is the code for one of the buttons which i would like changed to a a href tag. <input type="button" id="button1" class="buttons" value="div1"></input> Any help will be greatly appreciated. Thanks. Pia

    Read the article

  • Is there a jquery clone of ext.js' toolbar?

    - by fbuchinger
    I'm looking for a jquery equivalent of ext.js' toolbar (http://dev.sencha.com/deploy/dev/examples/menu/menus.html). To be more precisely, my requirements are the following: the toolbar should consist of iconic and textual buttons and dropdown widgets buttons should either trigger actions directly or open submenus buttons and submenus should have the ability to remember the last selected state buttonsets should group multiple buttons and only allow one of them to be active In short words, I'm looking for a real toolbar in jquery and not for some modified site menu. I experimented with the button/buttonset/menu widget in jquery ui 1.9m2, but found its IE performance rather poor. It also felt awkward to combine these isolated widgets into a logically connected toolbar. Does anyone know of a better jquery toolbar plugin?

    Read the article

  • How to create a generic Android XML layout for all activities

    - by zabawaba
    I have an application that needs the same items [5 buttons acting as tabs] in every screen. Is it possible to create a "base XML layout" that has these 5 buttons and then have all the other XML files extend from the bas layout in some way so that I don't have to have multiple buttons that will ultimately have the same functionality. Is there a better approach to this problem that can be supported by API 9

    Read the article

  • Why are button sizes on Eclipse vs Device not the same.

    - by Mike Droid
    O.k....this is weird. I had my buttons looking fine last week, now something has changed. My buttons on the eclipse emulator are much larger than on my device (Droid 2.1). I checked my skin settings, screen size permissions, density factors....what am I missing? My skin is set to WVGA854, but when the app goes to the phone the buttons are smaller!? Text and pictures are fine...looking the same as the emulator...just the buttons are shrunk! Hmm....I know it has to be something simple...:)

    Read the article

  • finding the value of radio button with jquery

    - by oo
    i have this code below to show different divs when i choose certain radio buttons: if ($("input[@name='exerciseRB']:checked").val() == 'New') { $("#newExercise").show(); $("#existingExercise").hide(); } else { $("#newExercise").hide(); $("#existingExercise").show(); } at first, i just had two radio buttons (both named exerciseRB and everything works fine. Now, later in my web page i added two new radio buttons (with the name lessonRB). The issue is that once i added these other new radio buttons when i look up this in firebug: $("input[@name='exerciseRB']:checked") i actually get an array back with both the exerciseRB item as well as the lessonRB item. Its almost as if the @name='exerciseRB' is being ignored. any ideas here?

    Read the article

  • Delphi Volume control by keyboard

    - by user568160
    Hi All, I recently had to replace a keyboard and this one ( GE 98552 ) does not have programmable buttons along the top and I miss the up/down volume buttons. it has 9 special buttons but none for volume and this model is not programmable. DUH! I am a long-time Delphi programmer but never messed with the multimedia stuff. Can anyone suggest some code to assign to say the "+" and "-" keys on the numeric pad that will change the volume up and down? I never use those two buttons so I would not be giving up functionality. Thanks Frank

    Read the article

  • Adding image to html markup

    - by user1491991
    Hello guys i'm having a problem appending a image to my html markup which is generated when a button is clicked... wondering if i could some dirction __--------------------------SCRIPT----------------------------------------------------------- (function($){ $.confirm = function(params){ if($('#confirmOverlay').length){ // A confirm is already shown on the page: return false; } var buttonHTML = ''; $.each(params.buttons,function(name,obj){ // Generating the markup for the buttons: buttonHTML += '<a href="#" class="button '+obj['class']+'">'+name+'<span></span></a>'; if(!obj.action){ obj.action = function(){}; } }); var closetext= 'close'; var markup = [ '<div id="confirmOverlay">', '<div id ="model">','<div id="confirmBox">', '<div id="header">','<div id ="title">',params.title,'</div>', '<div id="close">','<ol id = "olclose">','<li id = "liclose">','<a id="close" href = "#">',closetext,'</a></li>', '<li id = "liclose">','<a id="close" href = "#">','<img src="../modal-close.gif"/>','</a></li>','</ol></div></div>', '<div id ="textbox">','<p>',params.message,'<br>','<br>' ,buttonHTML,'</p>', '</div>', '</div></div></div></div>' ].join(''); $(markup).hide().appendTo('body').fadeIn(); var buttons = $('#confirmBox .button'), i = 0; $.each(params.buttons,function(name,obj){ buttons.eq(i++).click(function(){ // Calling the action attribute when a // click occurs, and hiding the confirm. obj.action(); $.confirm.hide(); return false; }); }); } $.confirm.hide = function(){ $('#confirmOverlay').fadeOut(function(){ $(this).remove(); }); } })(jQuery); i've used firebug to check and its unable to fetch the image here

    Read the article

  • Using Add-on SDK to add toolbar buttons? Integrating XUL and Add-on SDK for Firefox Add-ons?

    - by Salami
    I have already coded most of a Firefox add-on using the Add-on SDK API. I am now discovering that Add-on SDK might not be powerful enough for my purposes. I need two things: A drop down button in the toolbar next to the location bar. To modify the add-ons manager in firefox It is truly disappointing, but I don't believe either of these is possible with the Add-on SDK. First of all, I understand there is a widget module in the Add-on SDK API. But this only allows me to add a simple icon or label to the awkward add-on bar. What if I need to add a nicer button like the one next to the location bar for Firebug or Greasemonkey? As for modifying the add-ons manager in firefox, I have tried Nickolay Ponomarev's XUL with the Add-on SDK without any success whatsoever. If anyone knows how to get this working and can point me in the right direction that would be extremely helpful (cfx init --template xul doesn't do anything the regular SDK does when I try it)

    Read the article

  • Transparency and AlphaBlending

    - by TechTwaddle
    In this post we'll look at the AlphaBlend() api and how it can be used for semi-transparent blitting. AlphaBlend() takes a source device context and a destination device context (DC) and combines the bits in such a way that it gives a transparent effect. Follow the links for the msdn documentation. So lets take a image like, and AlphaBlend() it on our window. The code to do so is below, (under the WM_PAINT message of WndProc) HBITMAP hBitmap=NULL, hBitmapOld=NULL; HDC hMemDC=NULL; BLENDFUNCTION bf; hdc = BeginPaint(hWnd, &ps); hMemDC = CreateCompatibleDC(hdc); hBitmap = LoadBitmap(g_hInst, MAKEINTRESOURCE(IDB_BITMAP1)); hBitmapOld = SelectObject(hMemDC, hBitmap); bf.BlendOp = AC_SRC_OVER; bf.BlendFlags = 0; bf.SourceConstantAlpha = 80; //transparency value between 0-255 bf.AlphaFormat = 0;    AlphaBlend(hdc, 0, 25, 240, 100, hMemDC, 0, 0, 240, 100, bf); SelectObject(hMemDC, hBitmapOld); DeleteDC(hMemDC); DeleteObject(hBitmap); EndPaint(hWnd, &ps);   The code above creates a memory DC (hMemDC) using CreateCompatibleDC(), loads a bitmap onto the memory DC and AlphaBlends it on the device DC (hdc), with a transparency value of 80. The result is: Pretty simple till now. Now lets try to do something a little more exciting. Lets get two images involved, each overlapping the other, giving a better demonstration of transparency. I am also going to add a few buttons so that the user can increase or decrease the transparency by clicking on the buttons. Since this is the first time I played around with GDI apis, I ran into something that everybody runs into sometime or the other, flickering. When clicking the buttons the images would flicker a lot, I figured out why and used something called double buffering to avoid flickering. We will look at both my first implementation and the second implementation just to give the concept a little more depth and perspective. A few pre-conditions before I dive into the code: - hBitmap and hBitmap2 are handles to the two images obtained using LoadBitmap(), these variables are global and are initialized under WM_CREATE - The two buttons in the application are labeled Opaque++ (make more opaque, less transparent) and Opaque-- (make less opaque, more transparent) - DrawPics(HWND hWnd, int step=0); is the function called to draw the images on the screen. This is called from under WM_PAINT and also when the buttons are clicked. When Opaque++ is clicked the 'step' value passed to DrawPics() is +20 and when Opaque-- is clicked the 'step' value is -20. The default value of 'step' is 0 Now lets take a look at my first implementation: //this funciton causes flicker, cos it draws directly to screen several times void DrawPics(HWND hWnd, int step) {     HDC hdc=NULL, hMemDC=NULL;     BLENDFUNCTION bf;     static UINT32 transparency = 100;     //no point in drawing when transparency is 0 and user clicks Opaque--     if (transparency == 0 && step < 0)         return;     //no point in drawing when transparency is 240 (opaque) and user clicks Opaque++     if (transparency == 240 && step > 0)         return;         hdc = GetDC(hWnd);     if (!hdc)         return;     //create a memory DC     hMemDC = CreateCompatibleDC(hdc);     if (!hMemDC)     {         ReleaseDC(hWnd, hdc);         return;     }     //while increasing transparency, clear the contents of screen     if (step < 0)     {         RECT rect = {0, 0, 240, 200};         FillRect(hdc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH));     }     SelectObject(hMemDC, hBitmap2);     BitBlt(hdc, 0, 25, 240, 100, hMemDC, 0, 0, SRCCOPY);         SelectObject(hMemDC, hBitmap);     transparency += step;     if (transparency >= 240)         transparency = 240;     if (transparency <= 0)         transparency = 0;     bf.BlendOp = AC_SRC_OVER;     bf.BlendFlags = 0;     bf.SourceConstantAlpha = transparency;     bf.AlphaFormat = 0;            AlphaBlend(hdc, 0, 75, 240, 100, hMemDC, 0, 0, 240, 100, bf);     DeleteDC(hMemDC);     ReleaseDC(hWnd, hdc); }   In the code above, we first get the window DC using GetDC() and create a memory DC using CreateCompatibleDC(). Then we select hBitmap2 onto the memory DC and Blt it on the window DC (hdc). Next, we select the other image, hBitmap, onto memory DC and AlphaBlend() it over window DC. As I told you before, this implementation causes flickering because it draws directly on the screen (hdc) several times. The video below shows what happens when the buttons were clicked rapidly: Well, the video recording tool I use captures only 15 frames per second and so the flickering is not visible in the video. So you're gonna have to trust me on this, it flickers (; To solve this problem we make sure that the drawing to the screen happens only once and to do that we create an additional memory DC, hTempDC. We perform all our drawing on this memory DC and finally when it is ready we Blt hTempDC on hdc, and the images are displayed in one go. Here is the code for our new DrawPics() function: //no flicker void DrawPics(HWND hWnd, int step) {     HDC hdc=NULL, hMemDC=NULL, hTempDC=NULL;     BLENDFUNCTION bf;     HBITMAP hBitmapTemp=NULL, hBitmapOld=NULL;     static UINT32 transparency = 100;     //no point in drawing when transparency is 0 and user clicks Opaque--     if (transparency == 0 && step < 0)         return;     //no point in drawing when transparency is 240 (opaque) and user clicks Opaque++     if (transparency == 240 && step > 0)         return;         hdc = GetDC(hWnd);     if (!hdc)         return;     hMemDC = CreateCompatibleDC(hdc);     hTempDC = CreateCompatibleDC(hdc);     hBitmapTemp = CreateCompatibleBitmap(hdc, 240, 150);     hBitmapOld = (HBITMAP)SelectObject(hTempDC, hBitmapTemp);     if (!hMemDC)     {         ReleaseDC(hWnd, hdc);         return;     }     //while increasing transparency, clear the contents     if (step < 0)     {         RECT rect = {0, 0, 240, 150};         FillRect(hTempDC, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH));     }     SelectObject(hMemDC, hBitmap2);     //Blt hBitmap2 directly to hTempDC     BitBlt(hTempDC, 0, 0, 240, 100, hMemDC, 0, 0, SRCCOPY);         SelectObject(hMemDC, hBitmap);     transparency += step;     if (transparency >= 240)         transparency = 240;     if (transparency <= 0)         transparency = 0;     bf.BlendOp = AC_SRC_OVER;     bf.BlendFlags = 0;     bf.SourceConstantAlpha = transparency;     bf.AlphaFormat = 0;            AlphaBlend(hTempDC, 0, 50, 240, 100, hMemDC, 0, 0, 240, 100, bf);     //now hTempDC is ready, blt it directly on hdc     BitBlt(hdc, 0, 25, 240, 150, hTempDC, 0, 0, SRCCOPY);     SelectObject(hTempDC, hBitmapOld);     DeleteObject(hBitmapTemp);     DeleteDC(hMemDC);     DeleteDC(hTempDC);     ReleaseDC(hWnd, hdc); }   This function is very similar to the first version, except for the use of hTempDC. Another point to note is the use of CreateCompatibleBitmap(). When a memory device context is created using CreateCompatibleDC(), the context is exactly one monochrome pixel high and one monochrome pixel wide. So in order for us to draw anything onto hTempDC, we first have to set a bitmap on it. We use CreateCompatibleBitmap() to create a bitmap of required dimension (240x150 above), and then select this bitmap onto hTempDC. Think of it as utilizing an extra canvas, drawing everything on the canvas and finally transferring the contents to the display in one scoop. And with this version the flickering is gone, video follows:   If you want the entire solutions source code then leave a message, I will share the code over SkyDrive.

    Read the article

  • How to move from home page screen to the next menu screen on clicking a particular image in XNA4.0?

    - by Raj
    I m new 2 XNA game pgming(also C#)....I want 2 create a main page with some buttons and on clicking a particular button, it should goto another screen whr there r some buttons to select which should inturn goto the game screen on clicking....Whether I can put all the codes in the "game1.cs" or create new class for every page....Pls help... I've jus went through some pages in "Learning xna4.0" by o'reilly...If there s any other gud tutorials, pls suggest me...

    Read the article

  • How to set PyGtk toolbuttons label color?

    - by Voidcode
    I am just beginning learning Quickly and PyGtk, after see this info-video on Ubuntu-develperment. As in the video I am adding a toolbar to my glade-file, then some buttons. To style the toolbar for ubuntu I do: self.toolbar = self.builder.get_object("toolbar") context = self.toolbar.get_style_context() context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR) The style works, But the label-text-color for the buttons look like this: How can I changes the text color?

    Read the article

  • Three new ADF Insider Essentials on YouTube Channel

    - by Grant Ronald
    I've uploaded three ADF Insider Essentials onto our YouTube channel. How to delete a node in a hierarchical tree component. Handing the OK and Cancel buttons in an af:dialog popup Strategy for implementing global buttons These are ADF Insider Essentials that we originally loaded on OTN but we can now upload larger files (each of these is about 20 minutes long).  More ADF Insider Essentials in the pipeline so watch this space!    

    Read the article

  • Confusing box2d forces

    - by Diken
    Hello Friends. This is my demo game screen-shoot. Here i am using three buttons. Right-bottom button is used for jump and left-bottom buttons used for move left and right. I have some questions 1) should i use linearImpuls for jump body?? 2) For move right and left which types of force i applied??? PLease tell me i am confusing to use linearImpuls, applyforce and linearVelocity. Thanks in advance

    Read the article

  • How to Increase Conversion Rate of Your Website

    Conversion Rate is the frequency or percentage of your website visitors who were successfully converted to purchase a sale of your products or services through the use of your Calls to Action or CTA. Call to action buttons are the buttons that you, as a web designer, want all your users to click on when they land on your page. Usually they'll be a link to a download, signup or sale.

    Read the article

  • Outlook 2007 font sizes

    - by Flack
    Hello, Something really strange seems to have happened to my Outlook 2007. Everything was working fine for a long time now but at the end of today, all of a sudden, all of the fonts in Outlook are messed up. The font size of mails I write is huge (I am not zoomed in) and the font sizes of the buttons are big too, specifically the "Send", "To", and "Cc" buttons. I tried changing the font sizes through Outlook, but some of the buttons on the "Mail Format" tab in Options are not working, mainly the "Stationary and Fonts" button. I hit it but no window opens. This is all happening on my x64 machine. I took a look at my x32 machine, which also has Outlook 2007 installed and everything is ok there. Below is a link to an image comparing the broken, large font Outlook (top of picture) and the normal, working outlook. The text in the mails I compose is also abnormally large in the broken Outlook. Big font Outlook buttons. Any ideas? This came out of no where after a few months of no problems. Thanks.

    Read the article

  • How do I use key combinations on an axis on a joystick in xorg?

    - by valadil
    I'm using xserver-xorg-input-joystick on Debian Stable so I can use a joystick in place of the mouse. I have mouse movement working correctly, but got stuck trying to add functions for some other keys. These work: #Left stick #Pointer Option "MapAxis1" "mode=relative axis=1.5x" Option "MapAxis2" "mode=relative axis=1.5y" #Right stick #Arrow keys Option "MapAxis4" "mode=relative keylow=Left keyhigh=Right" Option "MapAxis5" "mode=relative keylow=Up keyhigh=Down" But when I try to make key combos (so I can navigate windows and screens in xmonad) I have no luck. #dpad #xmonad focus #up/down toggle window. l/r choose screen. Option "MapAxis8" "mode=relative keylow=Super_L,k keyhigh=Super_L,j" Option "MapAxis7" "mode=relative keylow=Super_L,w keyhigh=Super_L,e" I've also tried Super_R, plain old Super, Meta, and mod4mask, and anything else I can think of. These buttons print the letter, but don't appear to hold down the modifying key. The exception to that is shift. If I specify Shift_L or Shift_R, I get a capital letter. xev indicates that modifier keys are being pressed. If I lower Axis8, I get press Super_L, press k, release k, release Super_L. That looks like it should be working. Maybe this is an xmonad problem and not a joystick driver one? I'm also having trouble with getting an axis to use other XF86 keys: # triggers # song selection Option "MapAxis3" "mode=relative keylow=none keyhigh=XF86AudioForward" Option "MapAxis6" "mode=relative keylow=none keyhigh=XF86AudioBack" That does nothing. Any idea why? If it turns out that this isn't something I can do on an axis, but would work with a button, is there a way to treat my joysticks as buttons? Also, if anyone has suggestions for the other 5 buttons I'll have left after mouse buttons are bound, I'm listening.

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >