Search Results

Search found 15316 results on 613 pages for 'coding style'.

Page 6/613 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • how to set style to grid in extjs

    - by vaishali
    how to set style to grid so that it display font-family i am tring like this style: {'font-family': 'Brush Script MT', 'font-weight': 'bold' } but result does not show according to it. and i m also trying style:'font-family:Brush Script MT; font-size:300px', but it also not show the result according to it.. can u pls tell me why?

    Read the article

  • WPF Ignoring ProgressBar Style

    - by Nidonocu
    Following a problem in WPF 4 where the default ProgressBar template has an off-white highlight applied causing it to dull the foreground colour, I decided to extract the template and manually edit the values to white. After doing this, I put the template as a style in App.xaml for global use and the Visual Studio designer began to use it right away. However, when I run my app, the default style is still being applied: I then tried setting the style specifically using a key, then even having it as an inline style and finally as a inline template without a wrapping style for the specific progress bar and it is still ignored. What's going wrong? Current Code for progress bar: <ProgressBar Grid.Column="1" Grid.Row="2" Height="15" Width="355" Margin="0,0,0,7" IsIndeterminate="{Binding ProgressState, FallbackValue=False}" Visibility="{Binding ProgressVisibility, FallbackValue=Collapsed}" Value="{Binding ProgressValue, Mode=OneWay, FallbackValue=100}" Foreground="{Binding ProgressColor,FallbackValue=Red}"> <ProgressBar.Template> <ControlTemplate> <Grid Name="TemplateRoot" SnapsToDevicePixels="True"> <Rectangle RadiusX="2" RadiusY="2" Fill="{TemplateBinding Panel.Background}" /> ...

    Read the article

  • WPF: Apply ScrollBar Style to ListBox Template - Error object cannot be added to border

    - by TheMar
    Hi, I thought this may be straightforward question but did not find any definitive answer while searching net or SO. I have created scrollbar style (using standard scroll bard template - Blend 2) I am not sure how to apply this style "MyScrollStyle" to a ListBox Template . I saw on ListBox template they have Scroll Viewer -- which should contain the scrollbar Assuming it is something simple as ---Content Added--- After going through lot of xaml in template edit I kind of understood how to apply style. I am trying to add the scroll view style set in this example -http://blog.xamltemplates.net/wp-content/uploads/2008/12/scrollviewer.zip, to my list view template but it gives error -- System.Windows.Markup.XamlParseException was unhandled Message="'ScrollViewer' object cannot be added to 'Border'. Exception has been thrown by the target of an invocation. Error at object 'System.Windows.Controls.ScrollViewer' in markup file 'MenuModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null;component/resources/Resources.xaml' Line 19 Position 26." Source="PresentationFramework" LineNumber=19 LinePosition=26 NameContext="1_T" Any help is appreciated Thank you, The Mar

    Read the article

  • Why I can't style the DataGridTextColumn?

    - by Nike
    When I tried to create a Style to DataGridTextColumn with the following code: <Style TargetType="{x:Type DataGridTextColumn}"> ... </Style> Visual Studio 2010 highlight {x:Type DataGridTextColumn} by blue line and said: Exception has been thrown by the target of an invocation.

    Read the article

  • [WPF] ComboBox Style problems with DisplayMemberPath

    - by kornelijepetak
    I have a ComboBox and I have set the combo.ItemsSource property to a List object. The Book class contains two properties: "Abbreviation" and "Name". I have set the ComboBox's DisplayMemberPath to "Abbreviation" but the following style that is set on the ComboBox does not display the Abbreviation property, but instead shows "Words.Book" which is the name of the class. The ComboBox drop-down displays a list correctly (Using the specified Abbreviation property). The problem is in the selected ComboBox item, the one displayed when the ComboBox' drop-down is closed. I guess the problem is in ContentPresenter in DataTemplate but I was unable to find a successful solution. Currently the ContentPresenter's Content property is set to Content="{TemplateBinding Content} but I don't know if that's how it should be. Any ideas how to show the property specified in DisplayMemberPath on the selected item? Thank you the code: <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="20" /> </Grid.ColumnDefinitions> <Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="2" BorderThickness="1" Background="{DynamicResource ribbonTitleFade}" /> <Border Grid.Column="0" CornerRadius="2,0,0,2" Margin="1,6,1,6" BorderBrush="{DynamicResource boSecE}" BorderThickness="0,0,1,0" /> <Path x:Name="Arrow" Grid.Column="1" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="ToggleButton.IsMouseOver" Value="true"> <Setter TargetName="Border" Property="Background" Value="{DynamicResource ribbonTitleFade}" /> </Trigger> <Trigger Property="ToggleButton.IsChecked" Value="true"> <Setter TargetName="Border" Property="Background" Value="{DynamicResource ribbonTitleFade}" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="Border" Property="Background" Value="Black" /> <Setter TargetName="Border" Property="BorderBrush" Value="Black" /> <Setter Property="Foreground" Value="Gray"/> <Setter TargetName="Arrow" Property="Fill" Value="Gray" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> <Style x:Key="comboBoxBorderTransparent" TargetType="Control"> <Setter Property="BorderBrush" Value="{DynamicResource boPrimC}" /> </Style> <Style x:Key="comboItemStyle" TargetType="ComboBoxItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBoxItem}"> <Border x:Name="backBorder" > <StackPanel Orientation="Horizontal"> <Rectangle x:Name="rectA" Stroke="White" Width="4" Height="4" Fill="#80FFFFFF" Margin="5,0,0,0" HorizontalAlignment="Left" /> <TextBlock x:Name="text" Foreground="White" FontSize="10px"> <ContentPresenter Margin="8,1,0,1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> </TextBlock> </StackPanel> </Border> <ControlTemplate.Triggers> <Trigger Property="ComboBoxItem.IsMouseOver" Value="true"> <Setter TargetName="rectA" Property="Stroke" Value="Black" /> <Setter TargetName="rectA" Property="Fill" Value="#80000000" /> <Setter TargetName="backBorder" Property="Background" Value="White"/> <Setter TargetName="text" Property="Foreground" Value="{DynamicResource boPrimC}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <DataTemplate x:Key="comboSelectedItemTemplate"> <TextBlock Foreground="White" FontSize="10px"> <ContentPresenter Content="{TemplateBinding Content}" /> </TextBlock> </DataTemplate> <Style TargetType="ComboBox"> <Setter Property="SnapsToDevicePixels" Value="true"/> <Setter Property="OverridesDefaultStyle" Value="true"/> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.CanContentScroll" Value="true"/> <Setter Property="MinWidth" Value="60"/> <Setter Property="MinHeight" Value="20"/> <Setter Property="ItemContainerStyle" Value="{DynamicResource comboItemStyle}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ComboBox"> <Grid> <ToggleButton Name="ToggleButton" Grid.Column="2" Template="{StaticResource ComboBoxToggleButton}" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"> </ToggleButton> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{DynamicResource comboSelectedItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="3,3,23,3" /> <Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="False" Focusable="False" PopupAnimation="Slide"> <Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}"> <Border x:Name="DropDownBorder" Background="{DynamicResource ribbonTitleFade}" BorderThickness="1" BorderBrush="{DynamicResource boPrimC}" /> <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True"> <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" /> </ScrollViewer> </Grid> </Popup> </Grid> <ControlTemplate.Triggers> <Trigger Property="HasItems" Value="false"> <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="Black"/> </Trigger> <Trigger Property="IsGrouping" Value="true"> <Setter Property="ScrollViewer.CanContentScroll" Value="false"/> </Trigger> <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true"> <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="2"/> <Setter TargetName="DropDownBorder" Property="Margin" Value="0"/> </Trigger> <Trigger Property="IsEditable" Value="true"> <Setter Property="IsTabStop" Value="false"/> <!--<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>--> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> </Style.Triggers> </Style>

    Read the article

  • Links to official style guides

    - by User1
    C++ has several types of styles: MFC, Boost, Google, etc. I would like to examine these styles and determine which one is best for my projects, but I want to read from the official style guidebook. Does anyone have an official guide that they typically use? Here are two that I found. I bet there are more: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml http://www.boost.org/development/requirements.html Note: This is NOT a discussion about which styleis best..only a call for official style guides that people currently use. Please refrain from bashing other style guides that you don't like. Side question: Is there a good tool that can examine source code and tell if it matches a given style guide?

    Read the article

  • using style in WPF

    - by Polaris
    In my application I use ShinyBlue.xaml resourse Dictionary which has this code for GroupBox control: <Style TargetType="{x:Type GroupBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupBox}"> <Grid SnapsToDevicePixels="true"> <Grid.ColumnDefinitions> <ColumnDefinition Width="6" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="6" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="6" /> </Grid.RowDefinitions> <Border Grid.ColumnSpan="4" Grid.RowSpan="4" Background="{DynamicResource LightBrush}" CornerRadius="4,4,4,4" BorderThickness="1,1,1,1" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> These style common for all app. But in one of the forms I want to change background to Transparent. I want override only Background Property but it's not work <Style TargetType="GroupBox" BasedOn="{StaticResource {x:Type GroupBox}}"> <Setter Property="Background" Value="Transparent"/> </Style> code above not works properly How can I change GroupBox Background in specific form ?.

    Read the article

  • How to get Win32 to use Windows XP style fonts

    - by Semen Semenych
    I'm writing a Win32 application using plain C and WinAPI. No MFC or C++ is allowed. To get the controls to draw using the appropriate style, I use a manifest, as described in the corresponding MSDN article. Everything is fine, and when I change the system style, my application changes style as well. But the font used is just ugly. How do I force the application to use the standard system font?

    Read the article

  • SQL Server: avoiding hard coding of database name in cross-database views

    - by codeulike
    So, lets say you have two SQL Server Databases on the same server that reference each others tables in their Views, Functions and Stored Procedures. You know, things like this: use database_foo create view spaghetti as select f.col1, c.col2 from fusilli f inner join database_bar.dbo.conchigli c on f.id = c.id (I know that cross-database views are not very good practice, but lets just say you're stuck with it) Are there any good techniques to avoid 'hard coding' the database names? (So that should you need to occasionally re-point to a different database - for testing perhaps - you don't need to edit loads of views, fns, sps) I'm interested in SQL 2005 or SQL 2008 solutions. Cheers.

    Read the article

  • Question about best practices and Macros from the book 'C++ Coding Standards'

    - by Victor T.
    From Herb Sutter and Andrei Alexandrescu's 'C++ Coding Standards', Item 16: Avoid Macros under Exceptions for this guideline they wrote: For conditional compilation (e.g., system-dependent parts), avoid littering your code with #ifdefs. Instead, prefer to organize code such that the use of macros drives alternative implementations of one common interface, and then use the interface throughout. I'm having trouble understanding exactly what they mean by this. How can you drive alternate implementations without the use of #ifdef conditional compile macro directives? Can someone provide an example to help illustrate what's being proposed by the above paragraph? Thanks

    Read the article

  • What coding standards do you follow?

    - by Mark Szymanski
    I was just curious what coding standards people followed. I for one use the following: Brackets ALWAYS go on the next line. For instance: int main() { //Blah... } I never use code folding. (Yes my IDE's do support it (Xcode and Eclipse). Put related functions/methods single-spaced, otherwise double space. Here is an example: int foo = 0; printf("%d",foo); those are related while these are not: printf("Hello, World!"); return(0); I don't put else statements on the same line as the closing bracket for the preceding if statement. Most of the time in Java if a program needs multiple try catch statements I will just put the whole thing in one try catch.

    Read the article

  • Which coding style is more common?

    - by Babiker
    In no way shape or form am i advertising/promoting my programming style, but as far as 'multiple variable declarations' are concerned, which case is more acceptable professionally and commonly: case 1: private $databaseURL = "localhost" ; private $databaseUName = "root" ; private $databasePWord = "" ; private $databaseName = "AirAlliance"; case 2: private $databaseURL = "localhost"; private $databaseUName = "root"; private $databasePWord = ""; private $databaseName = "AirAlliance"; The reason i like case 1 is because i can skim though it and see that all is correct way faster than case 2. Also i can visually get familiar with variable names witch makes it faster to work with them l latter on the program.

    Read the article

  • April Oracle Database Events

    - by Mandy Ho
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} April 17-18, 2012 – Moscow, Russia Oracle Develop Conference The Oracle database developer conference, Oracle Develop, will visit Moscow, Russia and Hyderabad, India this spring. Oracle Develop includes a database development track, which contains .NET sessions and hands-on lab led by an Oracle .NET product manager. Register today before the event fills up. http://www.oracle.com/javaone/ru-en/index.html Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} April 24, 26 – San Diego, CA & San Jose, CA ISC2 Leadership Regional Event Series Oracle at (ISC)2 Security Leadership Series: Herding Clouds -- Managing Cloud Security Concerns and Expectations Join us for his interactive day-long session where industry leaders, including Oracle solution experts, will talk about how to: dispel the top Cloud security myths minimize "rogue Cloud" implementations identify potential compliance pitfalls and how to avoid them develop contract language for your cloud providers manage users across your fractured datacenter leverage existing technologies to protect data as it moves from the enterprise to the cloud http://www.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=146972&src=7239493&src=7239493&Act=228 Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} April 22-26, 2012 – Las Vegas, NV IOUG Collaborate 12 From April 22-26, 2012, Oracle takes Las Vegas. Thousands of Oracle professionals will descend upon the Mandalay Bay Convention Center for a weeks worth of education sessions, networking opportunities and more, at the only user-driven and user-run Oracle conference - COLLABORATE 12.  Your COLLABORATE 12 - IOUG Forum registration comes complete with a bonus- a full day Deep Dive education program on Sunday! Choose from numerous hot topics, including Real World Performance, High Availability and more, presented by legendary and seasoned Oracle pros, including Tom Kyte and Craig Shallahamer. http://www.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=143637&src=7360364&src=7360364&Act=5 Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} Independent Oracle User Group (IOUG) Regional Events: April 16, 2012 – Columbus, Ohio Ohio Oracle Users Group Higher Performance PL/PQL and Oracle Database 11g PL/SQL New Features – Featuring Steven Feuerstein http://www.ooug.org/ Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} April 26, 2012- Irving, TX Dallas Oracle Users Group Oracle Database Forum: 5-7PM Oracle Corporation, 6031 Connection Drive Irving, TX http://memberservices.membee.com/538/irmevents.aspx?id=64 Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} Apr 30, 2012- Los Angeles, CA Real World Performance Tour A full day of real world database performance with: Tom Kyte, author of the ever popular AskTom Blog, Andrew Holdsworth, head of Oracle's Real World Performance Team, and Graham Wood, renowned Oracle Database performance architect. Through discussion, debate and demos, they’ll show you how to master performance engineering topics like: Best practices for designing hardware architectures and how to spot and fix bad design. How to develop applications that deliver the fastest possible performance without sacrificing accuracy.  New for 2012! Updates on Enterprise Manager, Exadata, and what these technologies mean to your current systems. http://www.ioug.org/Events/ADayofRealWorldPerformance/tabid/194/Default.aspx

    Read the article

  • Set element style to the :hover style using jQuery

    - by Baddie
    Is it possible (using jQuery or otherwise) to set the style of a certain element to the :hover style defined in a stylesheet? .regStyle { background-color: #000; } .regStyle:hover { background-color: #fff; } Trying it out $("#differentButton").click(function(){ // this doesn't work $("#someElement").addClass("regStyle:hover").remove("regStyle"); });

    Read the article

  • Code Style - Do you prefer to return from a function early or just use an IF statement?

    - by Rachel
    I've often written this sort of function in both formats, and I was wondering if one format is preferred over another, and why. public void SomeFunction(bool someCondition) { if (someCondition) { // Do Something } } or public void SomeFunction(bool someCondition) { if (!someCondition) return; // Do Something } I usually code with the first one since that is the way my brain works while coding, although I think I prefer the 2nd one since it takes care of any error handling right away and I find it easier to read

    Read the article

  • What are the names for various forms of camel-case style naming?

    - by Robert Dailey
    For the purposes of communicating coding styles to my co-workers, what would I formally call the following variants of camel case? camelCase and CamelCase Notice that the former version starts with a lower-case alphabetic character, and the latter version starts with an upper-case alphabetic character. I assume these have some sort of "official name". Also if there are any other forms I have not listed here, bonus points to those that mention them as well as well as their names.

    Read the article

  • Jquery Resizable Issue

    - by MrEnder
    Ok my windows are supposed to be resizable... the web site is http://opentech.durhamcollege.ca/~intn2201/brittains/labs/ my code is document.writeln('<object id="cursorObj" width="0" height="0" >'); document.writeln('<param name="movie" value="flash/cursor.swf" name="wmode" value="transparent">'); document.writeln('<embed id="cursorEmbed" src="flash/cursor.swf" width="0" height="0" style="position: absolute;" wmode="transparent">'); document.writeln('</embed>'); document.writeln('</object>');*/ var browser=navigator.appName; var frameWidth = ""; var frameHeight = ""; var d = new Date(); var year = d.getFullYear(); var date = ""; var menuCheck = false; var si = ""; var io = ""; var windowT = ""; var cursorObj = ""; var cursorEmbed = ""; var windowState = false; var windowBody = ""; var bgImage_JS = document.getElementById("bgImage"); var desktop_JS = document.getElementById("desktop"); var menuBar_JS = document.getElementById("menuBar"); var menuBarButton_JS = document.getElementById("menuBarButton"); var menuBarContainer_JS = document.getElementById("menuBarContainer"); var menuBarClock_JS = document.getElementById("menuBarClock"); var action1_JS = document.getElementById("action1"); var action2_JS = document.getElementById("action2"); var action3_JS = document.getElementById("action3"); var showdesktopButton_JS = document.getElementById("menuBarButtonShowdesktopInput"); var windowExitImage_JS = document.getElementById("windowExitImage"); /*if(browser!="Netscape") { windowExitImage_JS.style.top = "-25px"; }*/ function requestWindow(url) { if(windowState==false) { windowOpen(); requestWindowInput() } else if(windowState==true) { windowClose(); } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET",url,false); xmlhttp.send(null); } function requestWindowInput() { document.getElementById('action1').innerHTML=xmlhttp.responseText; } function requestdesktop(url) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET",url,false); xmlhttp.send(null); document.getElementById('desktop').innerHTML=xmlhttp.responseText; } requestdesktop('desktop.php'); function reset() { if (self.innerWidth) { frameWidth = self.innerWidth; frameHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientWidth) { frameWidth = document.documentElement.clientWidth; frameHeight = document.documentElement.clientHeight; } else if (document.body) { frameWidth = document.body.clientWidth; frameHeight = document.body.clientHeight; } /*cursorObj = document.getElementById("cursorObj"); cursorEmbed = document.getElementById("cursorEmbed");*/ if(browser!="Netscape") { bgImage_JS.style.top = 8 + "px"; bgImage_JS.style.left = 8 + "px"; desktop_JS.style.top = 8 + "px"; desktop_JS.style.left = 8 + "px"; menuBar_JS.style.top = (frameHeight - 45) + "px"; menuBar_JS.style.left = 8 + "px"; desktop_JS.style.width = "24px"; } bgImage_JS.style.width = (frameWidth - 21) + "px"; bgImage_JS.style.height = (frameHeight - 51) + "px"; desktop_JS.style.width = (frameWidth - 20) + "px"; desktop_JS.style.height = (frameHeight - 50) + "px"; menuBar_JS.style.width = (frameWidth - 20) + "px"; menuBar_JS.style.top = (frameHeight - 40) + "px"; menuBarClock_JS.style.left = (frameWidth - 100) + "px"; /*cursorEmbed.style.width = (frameWidth - 20) + "px"; cursorEmbed.style.height = (frameHeight - 20) + "px"; cursorEmbed.style.width = (frameWidth - 20) + "px"; cursorEmbed.style.height = (frameHeight - 20) + "px";*/ t=setTimeout('reset()',500); } function menuSize() { action3_JS.style.backgroundColor = "black"; action3_JS.style.color = "#C0C0FF"; action3_JS.style.border = "1px solid #C0C0FF"; action3_JS.style.width = "250px"; action3_JS.style.height = "400px"; action3_JS.style.padding = "5px"; if(browser!="Netscape") { action3_JS.style.top = (frameHeight - 452) + "px"; var winCheck = frameWidth - 1651; if(winCheck<=0) { action3_JS.style.left = 8 + "px"; } else { action3_JS.style.left = (frameWidth - 1672) + "px"; } } else { action3_JS.style.top = (frameHeight - 452) + "px"; var winCheck = frameWidth - 1672; if(winCheck<=0) { action3_JS.style.left = 8 + "px"; } else { action3_JS.style.left = (frameWidth - 1672) + "px"; } } //menuT=setTimeout('menuSize()',500); } function menu() { if(menuCheck==false) { var lab1 = "'lab1.php'"; var lab2 = "'lab2.php'"; var lab3 = "'lab3.php'"; var lab4 = "'lab4.php'"; var lab5 = "'lab5.php'"; var lab6 = "'lab6.php'"; menuSize(); action3_JS.innerHTML = '<input type="button" class="menuButtons" id="menuButton1" value="Lab1" onclick="requestWindow(' + lab1 + ')" /><input type="button" class="menuButtons" id="menuButton2" value="Lab2" onclick="requestWindow(' + lab2 + ')" /><input type="button" class="menuButtons" id="menuButton3" value="Lab3" onclick="requestWindow(' + lab3 + ')" /><input type="button" class="menuButtons" id="menuButton4" value="Lab4" onclick="requestWindow(' + lab4 + ')" /><input type="button" class="menuButtons" id="menuButton5" value="Lab5" onclick="requestWindow(' + lab5 + ')" /><input type="button" class="menuButtons" id="menuButton6" value="Lab6" onclick="requestWindow(' + lab6 + ')" /><input type="button" class="menuButtons" id="menuButtonShowdesktop" value="Show desktop" onclick="showDesktop()" />'; menuCheck=true; } else if(menuCheck==true) { action3_JS.style.backgroundColor = "transparent"; action3_JS.style.border = "0px solid #C0C0FF"; action3_JS.style.width = "0px"; action3_JS.style.height = "0px"; action3_JS.style.padding = "0px"; action3_JS.style.top = "0px"; action3_JS.style.left = "0px"; action3_JS.innerHTML = ""; //window.clearTimeout(menuT); menuCheck=false; } } function clearMenu() { action3_JS.style.backgroundColor = "transparent"; action3_JS.style.border = "0px solid #C0C0FF"; action3_JS.style.width = "0px"; action3_JS.style.height = "0px"; action3_JS.style.padding = "0px"; action3_JS.style.top = "0px"; action3_JS.style.left = "0px"; action3_JS.innerHTML = ""; menuCheck=false; //menuT=setTimeout('clearMenu()',500); } function showDesktop() { clearMenu(); action1_JS.style.display = "none"; action1_JS.style.backgroundColor = "transparent"; action1_JS.style.border = "0px solid #C0C0FF"; action1_JS.style.width = 0 + "px"; action1_JS.style.height = 0 + "px"; action1_JS.style.left = 0 + "px"; action1_JS.style.top = 0 + "px"; window.clearInterval(si); window.clearTimeout(windowT); windowState = false; } function windowSize() { action1_JS.style.backgroundColor = "black"; action1_JS.style.color = "#C0C0FF"; action1_JS.style.border = "1px solid #C0C0FF"; action1_JS.style.width = (frameWidth - 375) + "px"; action1_JS.style.height = (frameHeight - 200) + "px"; action1_JS.style.left = (frameWidth - 1500) + "px"; var winCheck1 = (frameWidth - 1500); if(winCheck1<=0) { action1_JS.style.left = (frameWidth - 850) + "px"; } winCheck1 = (frameWidth - 850); if(winCheck1<=0) { action1_JS.style.left = (frameWidth - 300) + "px"; action1_JS.style.width = (frameWidth - 50) + "px"; } action1_JS.style.top = (frameHeight - 750) + "px"; var winCheck2 = (frameHeight - 750); if(winCheck2<=0) { action1_JS.style.top = (frameHeight - 500) + "px"; } //windowT=setTimeout('windowSize()',500); $(function() { $("#action1").resizable(); }); } function windowOpen() { windowSize(); action1_JS.style.display = "none"; $("#action1").fadeIn(1300); setTimeout("requestWindowInput()", 100); windowState = true; clearMenu(); } function windowClose() { action1_JS.style.display = ""; $("#action1").fadeOut(1300); windowState = false; clearMenu(); setTimeout("windowOpen()", 1350); } function windowDragStart() { $(function() {$("#action1").draggable( {disabled: false} );}); } function windowDragEnd() { $(function() {$("#action1").draggable( {disabled: true} );}); } function windowExitMouseover() { document.getElementById("windowExitImage").src = "images/exit2.png"; } function windowExitMouseout() { document.getElementById("windowExitImage").src = "images/exit1.png"; } $(function() { $("#action1").resizable(); }); I'm trying to use $(function() { $("#action1").resizable(); }); to resize my #action1 div sorry for the long code =[ not sure whats breaking it is why I sent everything

    Read the article

  • Defining a ContextMenu in a DataGridRow style

    - by Brent
    I'm trying to clean up some of my xaml in my views by moving a lot of the DataGrid styles into a ResourceDictionary. One of the things I'd like to move is the ContextMenu that is bound to some commands in the ViewModel. However, when I move the context menu to the ResourceDictionary, the commands are are never firing anymore, and I can't figure out why. I've defined the ContextMenu in the DataGridRow style so that when the user right clicks on the columnheader, no ContextMenu is shown... it will only be shown they right click on a row. Am I doing something wrong here? FYI I'm using VS 2010 RTM if that makes a difference. <Style x:Key="DataGridRowStyle" TargetType="{x:Type DataGridRow}"> <Setter Property="Height" Value="20"/> <Setter Property="ContextMenu"> <Setter.Value> <ContextMenu> <MenuItem Header="New" Command="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=DataContext.NewCommand}"> <MenuItem.Icon> <Image Source="/Images/DocumentWhite(32N).png" Width="16" Height="16"/> </MenuItem.Icon> </MenuItem> <MenuItem Header="Open" Command="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=DataContext.OpenCommand}"> <MenuItem.Icon> <Image Source="/Images/FolderOpenYellow(32N).png" Width="16" Height="16"/> </MenuItem.Icon> </MenuItem> <MenuItem Header="Delete" Command="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=DataContext.DeleteCommand}"> <MenuItem.Icon> <Image Source="/Images/Delete(32N).png" Width="16" Height="16"/> </MenuItem.Icon> </MenuItem> </ContextMenu> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="{StaticResource hoverGradient}"/> </Trigger> <Trigger Property="IsSelected" Value="True"> <Setter Property="Background" Value="{StaticResource BtnOverFill}"/> </Trigger> </Style.Triggers> </Style>

    Read the article

  • What is a Coding Dojo?

    - by huwyss
    Recently i found out that there is a thing called "coding dojo". The point behind it is that software developers want to have a space to learn new stuff like processes, methods, coding details, languages, and whatnot in an environment without stress. Just for fun. No competition. No results required. No deadlines.Some days ago I joined the Zurich coding dojo. We were three programmers with different backgrounds.We gave ourselves the task to develop a method that takes an input value and returns its prime factors. We did pair programming and every few minutes we switched positions. We used test driven development. The chosen programming language was Ruby.I haven't really done TDD before. It was pretty interesting to see the algorithm develop following the testcases.We started with the first test input=1 then developed the most simple productive program that passed this very first test. Then we added the next test input=2 and implemented the productive code. We kept adding tests and made sure all tests are passed until we had the general solution.When we improved the performance of our code we saw the value of the tests we wrote before. Of course our first performance improvement broke several tests.It was a very interesting experience to see how other developers think and how they work. I will participate at the dojo again and can warmly recommend it to anyone. There are  coding dojos all over the world.Have fun!

    Read the article

  • How do you overcome your own coding biases when handed legacy code?

    - by Bryan M.
    As programmers, we often take incredible pride in our skills and hold very strong opinions about what is 'good' code and 'bad' code. At any given point in our careers, we've probably had some legacy system dropped in our laps, and thought 'My god, this code sucks!' because it didn't fit into our notion of what good code should be, despite the fact that it may have well been perfectly functional, maintainable code. How do you prepare yourself mentally when trying to get your head around another programmer's work?

    Read the article

  • How is your working time distributed between coding and thinking?

    - by mojuba
    ...in percentage. For example 60/40 or 90/10 or 100/0. My hypothesis is that the bigger the proportion of time you spend thinking the smaller your code can be as a result (and the less time will be needed to write it down). Think more, write less, in other words. Do you think it is true? As a side note, I think in typical software companies thinking is not part of the culture anyway: you are usually supposed to be sitting there at your computer typing something. You will almost definitely be noticed by your managers if you wander about with a blank look thinking over your next steps with your code. Too bad.

    Read the article

  • Silverlight ~ MVVM ~ Dynamic setting of Style property based on model value

    - by eponymous23
    I have a class called Question that represents a question and it's answer. I have an application that renders an ObservableCollection of Question objects. Each Question is rendered as a StackPanel that contains a TextBlock for the question verbiage, and a TextBox for the user to enter in an answer. The questions are rendered using an ItemsControl, and I have initially set the Style of the Questions's StackPanel using a StaticResource key called 'IncorrectQuestion' (defined in UserControl.Resources section of the page). In the UserControl.Resources section, I've also defined a key calld 'CorrectQuestion' which I need to somehow apply to the Question's StackPanel when the user correctly answers the question. My problem is I'm not sure how to dynamically change the Style of the StackPanel, specifically within the constraints of a ViewModel class (i.e. I don't want to put any style selection code in the View's code-behind). My Question class has an IsCorrect property which is accurately being set when the correction is answered. I'd like to somehow reflect the IsCorrect value in the form of a Style selection. How do I do that?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >