Image

Posted: 2015-11-07 in 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!

Screen Shot 2014-10-12 at 4.56.50 PM



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.


gadgets

  • 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.



attributes


  • 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. 
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, the 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.



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s