Results 1 to 9 of 9

Thread: [Answers] Image

Threaded View

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135

    [Answers] Image

    image gadget on the employees page.

    • Create a new app
    • Goto the pages workspace
    • Open the Southwind database
    • Drag the employees table onto the page, this will create a form section displaying the employees table data.
    • Now click the gadgets buttons in the form bar at the bottom and add an image gadget.
    • Double click on the image gadget header to bring up it's attributes.
    • Set the Caption and the Datasource as shown in the attached screen shot.
    • The Image gadget is now data bound to the photo field in the employees table.
    • Double clicking the image brings up a file browser for uploading images.




    Q:
    if I want to add images to my newly created app can I not simply add (new file) under images directory showing under the app within the GUI ?
    A:
    Drag and drop the image file from an Explorer Window into App Workspace 'Files' and it will show it within its correct category.



    Are you aware that the Lianja Web/Mobile Client supports image uploading. This does not require any code to be written on the client or server-side as it's all built into the Lianja Web Framework. All you need to do is add an "Image gadget" to a form section. Why write code when you don't need to!





    Q:
    how to add / edit / delete photo into table, eg. employee table.
    A:
    If you open the Lianja Demo app, there is an example of using an image gadget on the employees page.
    Building your own example is easily accomplished.

    • Create a new app
    • Goto the pages workspace
    • Open the Southwind database
    • Drag the employees table onto the page, this will create a form section displaying the employees table data.
    • Now click the gadgets buttons in the form bar at the bottom and add an image gadget.




    • Double click on the image gadget header to bring up it's attributes.
    • Set the Caption and the Datasource as shown in the attached screen shot.





    • The Image gadget is now data bound to the photo field in the employees table.
    • Double clicking the image brings up a file browser for uploading images.


    You write images into an "object" or "graphics" column using REPLACE, not from a character column.
    Code:
    Replace field with "filename"
    so if you are trying to use a fieldname contents as the filename put it into a temporary variable then use "&varname" in your replace statement.



    No, (web apps) images need to be in a table.
    In web apps (which he is building) you cannot just access files all over the disk for security reasons.



    Q:
    In VFP we used Thisform.LockScreen = .T. / .F.
    A:
    Lianja.lockscreen = 1
    then
    Lianja.lockscreen = 0
    Give it a whirl. If I understand you correctly you want to disable screen updates, do something, then re-enable them.
    A word of warning: Do not do this from the command window as it prevents all further input and output until it is re-enabled.
    Also make sure your code that runs has no errors as you will not be able to interact with the UI while lockscreen is active.



    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...ll=1#post12352


    Last edited by josipradnik; 2016-11-14 at 03:10.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us